diff --git a/clog/attrs.go b/clog/attrs.go index 217d11a..c93fda6 100644 --- a/clog/attrs.go +++ b/clog/attrs.go @@ -21,5 +21,9 @@ func ConvertToAttrs(fields Fields) []any { } func isZeroValue(v interface{}) bool { - return v == reflect.Zero(reflect.TypeOf(v)).Interface() + t := reflect.TypeOf(v) + if !t.Comparable() { + return false + } + return v == reflect.Zero(t).Interface() }