log: format nil as <nil> by default

This commit is contained in:
Martin Holst Swende 2023-11-29 09:21:19 +01:00
parent 632a3f891f
commit d2251afece
No known key found for this signature in database
GPG key ID: 683B438C05A5DDF0

View file

@ -174,7 +174,7 @@ func FormatSlogValue(v slog.Value, term bool, tmp []byte) (result []byte) {
value = v.Any()
}
if value == nil {
return []byte("nil")
return []byte("<nil>")
}
switch v := value.(type) {
case *big.Int: