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?

  1. go mod init godebug
module godebug

go 1.25.0
  1. go mod edit -godebug 'http2debug=2'
module godebug

go 1.25.0

godebug http2debug=2
  1. 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

Related Documentation

(Emoji vote if this was helpful or unhelpful; more detailed feedback welcome in this discussion.)