Go version
go version go1.25.0 linux/amd64
Output of go env
in your module/workspace:
AR='ar'
CC='gcc'
CGO_CFLAGS='-O2 -g'
CGO_CPPFLAGS=''
CGO_CXXFLAGS='-O2 -g'
CGO_ENABLED='1'
CGO_FFLAGS='-O2 -g'
CGO_LDFLAGS='-O2 -g'
CXX='g++'
GCCGO='gccgo'
GO111MODULE=''
GOAMD64='v1'
GOARCH='amd64'
GOAUTH='netrc'
GOBIN=''
GOCACHE='/home/rsteube/.cache/go-build'
GOCACHEPROG=''
GODEBUG=''
GOENV='/home/rsteube/.config/go/env'
GOEXE=''
GOEXPERIMENT=''
GOFIPS140='off'
GOFLAGS=''
GOGCCFLAGS='-fPIC -m64 -pthread -Wl,--no-gc-sections -fmessage-length=0 -ffile-prefix-map=/tmp/go-build2746397279=/tmp/go-build -gno-record-gcc-switches'
GOHOSTARCH='amd64'
GOHOSTOS='linux'
GOINSECURE=''
GOMOD='/tmp/godebug/go.mod'
GOMODCACHE='/home/rsteube/go/pkg/mod'
GONOPROXY='github.com/carapace-sh,github.com/tap-dance'
GONOSUMDB='github.com/carapace-sh,github.com/tap-dance'
GOOS='linux'
GOPATH='/home/rsteube/go'
GOPRIVATE='github.com/carapace-sh,github.com/tap-dance'
GOPROXY='https://proxy.golang.org,direct'
GOROOT='/home/rsteube/Documents/go1.25'
GOSUMDB='sum.golang.org'
GOTELEMETRY='local'
GOTELEMETRYDIR='/home/rsteube/.config/go/telemetry'
GOTMPDIR=''
GOTOOLCHAIN='auto'
GOTOOLDIR='/home/rsteube/Documents/go1.25/pkg/tool/linux_amd64'
GOVCS=''
GOVERSION='go1.25.0'
GOWORK=''
PKG_CONFIG='pkg-config'
What did you do?
go mod init godebug
module godebug
go 1.25.0
go mod edit -godebug 'http2debug=2'
module godebug
go 1.25.0
godebug http2debug=2
go mod edit -json
{
"Module": {
"Path": "godebug"
},
"Go": "1.25.0",
"Require": null,
"Exclude": null,
"Replace": null,
"Retract": null,
"Tool": null,
"Ignore": null
}
What did you see happen?
Output missing GoDebug
entries.
What did you expect to see?
GoDebug
entries as described in go help mod edit
:
type GoMod struct {
Module ModPath
Go string
Toolchain string
Godebug []Godebug
Require []Require
Exclude []Module
Replace []Replace
Retract []Retract
}
type Godebug struct {
Key string
Value string
}
Comment From: gabyhelp
Related Issues
- compiler detects module based on current working directory #68043 (closed)
- cmd/go: can't inspect go env when $GOPATH/go.mod exists #46807 (closed)
- x/website: #45769 (closed)
- `runtime/debug.BuildInfo.Path`: redundant with `runtime/debug.BuildInfo.Main.Path` #68177 (closed)
- cmd/go: `go mod init go` internal panic #74784 (closed)
- cmd/go: godebug default=go1.20 does not set same netedns0 as GOPATH mode #73973
- cmd/go: `go env` does not show GODEBUG #65777 (closed)
- cmd/go: only generate a new 'go.mod' file during 'go mod init' #29433 (closed)
- cmd/go: go mod init in GOPATH can create invalid module path #46085 (closed)
Related Documentation
(Emoji vote if this was helpful or unhelpful; more detailed feedback welcome in this discussion.)