Skip to content

runtime/debug.BuildInfo.Path: redundant with runtime/debug.BuildInfo.Main.Path #68177

@Malix-Labs

Description

@Malix-Labs

Go version

go version go1.22.3 linux/amd64

Output of go env in your module/workspace:

vscode ➜ /workspaces/Discord_GitHub-Utilities (master) $ go env
GO111MODULE=''
GOARCH='amd64'
GOBIN=''
GOCACHE='/home/vscode/.cache/go-build'
GOENV='/home/vscode/.config/go/env'
GOEXE=''
GOEXPERIMENT=''
GOFLAGS=''
GOHOSTARCH='amd64'
GOHOSTOS='linux'
GOINSECURE=''
GOMODCACHE='/go/pkg/mod'
GONOPROXY=''
GONOSUMDB=''
GOOS='linux'
GOPATH='/go'
GOPRIVATE=''
GOPROXY='https://proxy.golang.org,direct'
GOROOT='/usr/local/go'
GOSUMDB='sum.golang.org'
GOTMPDIR=''
GOTOOLCHAIN='local'
GOTOOLDIR='/usr/local/go/pkg/tool/linux_amd64'
GOVCS=''
GOVERSION='go1.22.3'
GCCGO='gccgo'
GOAMD64='v1'
AR='ar'
CC='gcc'
CXX='g++'
CGO_ENABLED='1'
GOMOD='/workspaces/Discord_GitHub-Utilities/go.mod'
GOWORK=''
CGO_CFLAGS='-O2 -g'
CGO_CPPFLAGS=''
CGO_CXXFLAGS='-O2 -g'
CGO_FFLAGS='-O2 -g'
CGO_LDFLAGS='-O2 -g'
PKG_CONFIG='pkg-config'
GOGCCFLAGS='-fPIC -m64 -pthread -Wl,--no-gc-sections -fmessage-length=0 -ffile-prefix-map=/tmp/go-build1864882069=/tmp/go-build -gno-record-gcc-switches'

What did you do?

Checked: runtime/debug.BuildInfo.Path == runtime/debug.BuildInfo.Main.Path

What did you see happen?

Confirmed: runtime/debug.BuildInfo.Path == runtime/debug.BuildInfo.Main.Path

What did you expect to see?

Remove runtime/debug.BuildInfo.Path as redundant with runtime/debug.BuildInfo.Main.Path

References

  • // Path is the package path of the main package for the binary
    // (for example, "golang.org/x/tools/cmd/stringer").
    Path string
    // Main describes the module that contains the main package for the binary.
    Main Module

  • Path string // module path

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions