[VOL-5402]-VGC all fixes till date from jan 2024
Change-Id: I2857e0ef9b1829a28c6e3ad04da96b826cb900b6
Signed-off-by: Akash Soni <akash.soni@radisys.com>
diff --git a/internal/pkg/util/envutils/envutils.go b/internal/pkg/util/envutils/envutils.go
index 10a3219..8ef7149 100644
--- a/internal/pkg/util/envutils/envutils.go
+++ b/internal/pkg/util/envutils/envutils.go
@@ -87,14 +87,16 @@
MaxFlowRetryDuration = "MAX_FLOW_RETRY_DURATION"
// openonu environment variables
- OmciPacketCapture = "SAVE_OMCI_PACKET_CAPTURE"
+ OmciPacketCapture = "SAVE_OMCI_PACKET_CAPTURE"
+ Undefined = " undefined"
+ EnvironmentVariable = "Environment variable "
)
// ParseStringEnvVariable reads the environment variable and returns env as string
func ParseStringEnvVariable(envVarName string, defaultVal string) string {
envValue := os.Getenv(envVarName)
if envValue == "" {
- fmt.Println("Environment variable " + envVarName + " undefined")
+ fmt.Println(EnvironmentVariable + envVarName + Undefined)
return defaultVal
}
return envValue
@@ -104,7 +106,7 @@
func ParseIntEnvVariable(envVarName string, defaultVal int64) int64 {
envValue := os.Getenv(envVarName)
if envValue == "" {
- fmt.Println("Environment variable "+envVarName+" undefined", envVarName)
+ fmt.Println(EnvironmentVariable+envVarName+Undefined, envVarName)
return defaultVal
}
returnVal, err := strconv.Atoi(envValue)
@@ -119,7 +121,7 @@
func ParseBoolEnvVariable(envVarName string, defaultVal bool) bool {
envValue := os.Getenv(envVarName)
if envValue == "" {
- fmt.Println("Environment variable " + envVarName + " undefined")
+ fmt.Println(EnvironmentVariable + envVarName + Undefined)
return defaultVal
}
if envValue == "true" || envValue == "True" {