Merge branch 'master' into master

This commit is contained in:
Matt Schiros 2019-02-12 10:50:04 -08:00 committed by GitHub
commit 013102194f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -63,8 +63,13 @@ var LogFormatter = func(values ...interface{}) (messages []interface{}) {
formattedValues = append(formattedValues, "NULL") formattedValues = append(formattedValues, "NULL")
} }
} else { } else {
switch value.(type) {
case int, int8, int16, int32, int64, uint, uint8, uint16, uint32, uint64, float32, float64, bool:
formattedValues = append(formattedValues, fmt.Sprintf("%v", value))
default:
formattedValues = append(formattedValues, fmt.Sprintf("'%v'", value)) formattedValues = append(formattedValues, fmt.Sprintf("'%v'", value))
} }
}
} else { } else {
formattedValues = append(formattedValues, "NULL") formattedValues = append(formattedValues, "NULL")
} }