Files
goma-gateway/util/constants.go

38 lines
726 B
Go
Raw Normal View History

2024-10-27 06:10:27 +01:00
package util
/*
Copyright 2024 Jonas Kaninda.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may get a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
*/
import (
"os"
)
var Version string
const ConfigVersion = "1.0"
2024-10-27 06:10:27 +01:00
func VERSION(def string) string {
build := os.Getenv("VERSION")
if build == "" {
return def
}
return build
}
func FullVersion() string {
ver := Version
if b := VERSION(""); b != "" {
return b
}
return ver
}
2024-10-30 04:52:49 +01:00
2024-10-30 18:01:53 +01:00
const MainExample = "Initialize config: config init --output config.yml\n" +
2024-10-30 04:52:49 +01:00
"Start server: server \n" +
"Start server with custom config file: server --config config.yml"