Skip to content

cmd/go: clarify documentation for DefaultGODEBUG #70245

@findleyr

Description

@findleyr

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    DocumentationIssues describing a change to documentation.GoCommandcmd/goNeedsInvestigationSomeone must examine and confirm this is a valid issue and not a duplicate of an existing one.

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions