in config/config_map.go [228:257]
func parseValue(value string) (interface{}, error) {
// Try to parse as json
var jsonValue interface{}
if err := json.Unmarshal([]byte(value), &jsonValue); err == nil {
return jsonValue, nil
}
// Try to parse as a integer with strconv
if intValue, err := strconv.Atoi(value); err == nil {
return intValue, nil
}
// Try to parse as a float with strconv
if floatValue, err := strconv.ParseFloat(value, 64); err == nil {
return floatValue, nil
}
// Try to parse as a boolean
if value == "true" || value == "false" {
return value == "true", nil
}
// Try to parse as null
if value == "null" {
return nil, nil
}
// Otherwise, return the string
return value, nil
}