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