You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Сannot understand why fmt is used as reference here. As for me it would be convenient to distinquish between empty and non-initialised maps. Current approach leads to confusion.
Go version
go version go1.22.5 darwin/arm64
Output of
go env
in your module/workspace:GO111MODULE=''
What did you do?
package main
import "log/slog"
func main() {
var value map[string]string = nil
slog.Error("message", "value", value)
}
What did you see happen?
2009/11/10 23:00:00 ERROR message value=map[]
What did you expect to see?
2009/11/10 23:00:00 ERROR message value=nil
The text was updated successfully, but these errors were encountered: