timetable-mgr/src/helpers/config.go

29 lines
559 B
Go
Raw Normal View History

2023-07-15 23:00:48 +01:00
package helpers
2023-07-15 22:32:46 +01:00
import (
"fmt"
2023-07-18 00:25:13 +01:00
"os"
2023-07-18 14:09:28 +01:00
"git.fjla.uk/owlboard/mq-client/log"
2023-07-15 22:32:46 +01:00
)
// Version Constants
const versionNum string = "2023.7.1"
const versionSuffix string = "beta"
2023-07-15 23:00:48 +01:00
const Version string = versionNum + "-" + versionSuffix
2023-07-15 22:32:46 +01:00
// Environment Variables
var runtime string = getRuntime()
2023-07-15 23:06:32 +01:00
var NrUser string = "nil"
var NrPass string = ""
2023-07-15 22:32:46 +01:00
// Functions
func getRuntime() string {
var runtimeEnv string = os.Getenv("runtime")
if runtimeEnv == "" {
runtimeEnv = "unknown"
}
2023-07-19 01:18:55 +01:00
log.Msg.Debug(fmt.Sprintf("Runtime mode: %s", runtimeEnv))
2023-07-15 22:32:46 +01:00
return runtimeEnv
}