//GetEnvAsDecimal function will fetch the value from environment variable and convert that to an float64.
//If the value is absent then it will return defaultVal supplied.
GetEnvAsDecimal function will fetch the value from environment variable and convert that to an float64.
If the value is absent then it will return defaultVal supplied.
// GetEnvAsDecimal function will fetch the value from environment variable and convert that to an float64 . // If the value is absent then it will return defaultVal supplied .
func GetEnvAsDecimal(key string, defaultVal float64) (float64, error) {
	if value, ok := os.LookupEnv(key); ok {
		return strconv.ParseFloat(value, 64)
	}
	return defaultVal, nil
}
func GetEnvAsDecimal ( key string , defaultVal float64 ) ( float64 , error ) { if value , ok := os . LookupEnv ( key ) ; ok { return strconv . ParseFloat ( value , 64 ) } return defaultVal , nil }
GetEnvAsDecimal function will fetch the value from environment variable and convert that to an float64.
GetEnvAsDecimal function will fetch the value from environment variable and convert that to an float64 .