The documentation for DefaultGODEBUG at https://go.dev/doc/godebug says "Only differences from the base Go toolchain defaults are reported.", but that's not the case: consider that x/tools/cmd/eg sets gotypesalias=1 in a //go:debug directive. Yet:
GOTOOLCHAIN=go1.22.0 go list -f {{.DefaultGODEBUG}} ./cmd/eg returns nothing
GOTOOLCHAIN=go1.23.1 go list -f {{.DefaultGODEBUG}} ./cmd/eg reports gotypesalias=1, even though that's the default
I will send a fix to ./cmd/go/internal/load/godebug.go.
CC @rsc @timothy-king @adonovan
The documentation for DefaultGODEBUG at https://go.dev/doc/godebug says "Only differences from the base Go toolchain defaults are reported.", but that's not the case: consider that x/tools/cmd/eg sets
gotypesalias=1in a//go:debugdirective. Yet:GOTOOLCHAIN=go1.22.0 go list -f {{.DefaultGODEBUG}} ./cmd/egreturns nothingGOTOOLCHAIN=go1.23.1 go list -f {{.DefaultGODEBUG}} ./cmd/egreportsgotypesalias=1, even though that's the defaultI will send a fix to ./cmd/go/internal/load/godebug.go.
CC @rsc @timothy-king @adonovan