Skip to content

could not import main (cannot import "main") #69736

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

Closed
CN-Hutian opened this issue Oct 2, 2024 · 3 comments
Closed

could not import main (cannot import "main") #69736

CN-Hutian opened this issue Oct 2, 2024 · 3 comments

Comments

@CN-Hutian
Copy link

What version of Go are you using (go version)?

$ go version
go version go1.23.1 windows/amd64

Does this issue reproduce with the latest release?

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

go env Output
$ go env
set GO111MODULE=on
set GOARCH=amd64
set GOBIN=
set GOCACHE=C:\Users\77902\AppData\Local\go-build
set GOENV=C:\Users\77902\AppData\Roaming\go\env
set GOEXE=.exe
set GOEXPERIMENT=
set GOFLAGS=
set GOHOSTARCH=amd64
set GOHOSTOS=windows
set GOINSECURE=
set GOMODCACHE=C:\Users\77902\go\pkg\mod
set GONOPROXY=
set GONOSUMDB=
set GOOS=windows
set GOPATH=C:\Users\77902\go
set GOPRIVATE=
set GOPROXY=https://mirrors.aliyun.com/goproxy/,direct
set GOROOT=C:\Users\77902\AppData\Local\Programs\Go
set GOSUMDB=sum.golang.org
set GOTMPDIR=
set GOTOOLCHAIN=auto
set GOTOOLDIR=C:\Users\77902\AppData\Local\Programs\Go\pkg\tool\windows_amd64
set GOVCS=
set GOVERSION=go1.23.1
set GODEBUG=
set GOTELEMETRY=local
set GOTELEMETRYDIR=C:\Users\77902\AppData\Roaming\go\telemetry
set GCCGO=gccgo
set GOAMD64=v1
set AR=ar
set CC=gcc
set CXX=g++
set CGO_ENABLED=1
set GOMOD=D:\Hutian_Desktop\CS\0.go_test\go.mod
set GOWORK=
set CGO_CFLAGS=-O2 -g
set CGO_CPPFLAGS=
set CGO_CXXFLAGS=-O2 -g
set CGO_FFLAGS=-O2 -g
set CGO_LDFLAGS=-O2 -g
set PKG_CONFIG=pkg-config
set GOGCCFLAGS=-m64 -mthreads -Wl,--no-gc-sections -fmessage-length=0 -ffile-prefix-map=C:\Users\77902\AppData\Local\Temp\go-build4195022210=/tmp/go-build -gno-record-gcc-switches
gdb --version: GNU gdb (GDB) 13.1

What did you do?

What did you expect to see?

What did you see instead?

@gabyhelp
Copy link

gabyhelp commented Oct 2, 2024

Related Issues and Documentation

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

@ianlancetaylor
Copy link
Contributor

That's true: you can't import a main package.

@ianlancetaylor ianlancetaylor closed this as not planned Won't fix, can't repro, duplicate, stale Oct 2, 2024
@zigo101
Copy link

zigo101 commented Oct 2, 2024

see #21256 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants