Refactoring of code, renaming env variables name

This commit is contained in:
2024-07-30 08:59:15 +02:00
parent 05a195e1ba
commit 886773e38f
6 changed files with 35 additions and 19 deletions

View File

@@ -178,6 +178,15 @@ func SetEnv(key, value string) {
return
}
}
func GetEnvVariable(envName, oldEnvName string) string {
value := os.Getenv(envName)
if value == "" {
value = os.Getenv(oldEnvName)
if value != "" {
fmt.Printf("%s is deprecated, please use %s instead!\n", oldEnvName, envName)
}
}
return value
}
func ShowHistory() {
}