Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cmd/go: "package command-line-arguments is not a main package" is confusing #64484

Closed
willfaught opened this issue Nov 30, 2023 · 1 comment
Closed

Comments

@willfaught
Copy link
Contributor

Go version

go version go1.21.4 darwin/amd64

What operating system and processor architecture are you using (go env)?

GO111MODULE=''
GOARCH='amd64'
GOBIN=''
GOCACHE='/Users/Will/Library/Caches/go-build'
GOENV='/Users/Will/Library/Application Support/go/env'
GOEXE=''
GOEXPERIMENT=''
GOFLAGS=''
GOHOSTARCH='amd64'
GOHOSTOS='darwin'
GOINSECURE=''
GOMODCACHE='/Users/Will/Library/Application Support/go/pkg/mod'
GONOPROXY='github.com/FrontRowXP,github.com/frontrowxp'
GONOSUMDB='github.com/FrontRowXP,github.com/frontrowxp'
GOOS='darwin'
GOPATH='/Users/Will/Library/Application Support/go'
GOPRIVATE='github.com/FrontRowXP,github.com/frontrowxp'
GOPROXY='https://proxy.golang.org,direct'
GOROOT='/usr/local/Cellar/go/1.21.4/libexec'
GOSUMDB='sum.golang.org'
GOTMPDIR=''
GOTOOLCHAIN='auto'
GOTOOLDIR='/usr/local/Cellar/go/1.21.4/libexec/pkg/tool/darwin_amd64'
GOVCS=''
GOVERSION='go1.21.4'
GCCGO='gccgo'
GOAMD64='v1'
AR='ar'
CC='cc'
CXX='c++'
CGO_ENABLED='1'
GOMOD='/Users/Will/Developer/work/backend/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 -arch x86_64 -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -ffile-prefix-map=/var/folders/bx/qk0phsxd265fqj512dnnpg080000gn/T/go-build1547774763=/tmp/go-build -gno-record-gcc-switches -fno-common'

What did you do?

go run ./cmd/graphql/main.go

What did you expect to see?

package is not a main package

What did you see instead?

package command-line-arguments is not a main package

I have no idea where "command-line-arguments" came from.

@seankhliao
Copy link
Member

Duplicate of #36043

@seankhliao seankhliao marked this as a duplicate of #36043 Nov 30, 2023
@seankhliao seankhliao closed this as not planned Won't fix, can't repro, duplicate, stale Nov 30, 2023
@golang golang locked and limited conversation to collaborators Nov 29, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants