log: remove relection tests for nil

This commit is contained in:
Martin Holst Swende 2020-04-28 12:34:51 +02:00
parent b5abd6d127
commit a6d10f4ba1
No known key found for this signature in database
GPG key ID: 683B438C05A5DDF0

View file

@ -325,7 +325,7 @@ func formatJSONValue(value interface{}) interface{} {
// formatValue formats a value for serialization
func formatLogfmtValue(value interface{}, term bool) string {
if value == nil || (reflect.ValueOf(value).Kind() == reflect.Ptr && reflect.ValueOf(value).IsNil()) {
if value == nil {
return "nil"
}