We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
go version go1.23.3 darwin/arm64
go env
GO111MODULE='on' GOARCH='arm64' GOBIN='' GOCACHE='~/Library/Caches/go-build' GOENV='~/Library/Application Support/go/env' GOEXE='' GOEXPERIMENT='' GOFLAGS='' GOHOSTARCH='arm64' GOHOSTOS='darwin' GOINSECURE='' GOMODCACHE='~/go/pkg/mod' GONOPROXY='' GONOSUMDB='' GOOS='darwin' GOPATH='~/go' GOPRIVATE='' GOPROXY='https://proxy.golang.org,direct' GOROOT='/opt/homebrew/opt/go/libexec' GOSUMDB='sum.golang.org' GOTMPDIR='' GOTOOLCHAIN='local' GOTOOLDIR='/opt/homebrew/opt/go/libexec/pkg/tool/darwin_arm64' GOVCS='' GOVERSION='go1.23.3' GODEBUG='' GOTELEMETRY='local' GOTELEMETRYDIR='~/Library/Application Support/go/telemetry' GCCGO='gccgo' GOARM64='v8.0' AR='ar' CC='cc' CXX='c++' CGO_ENABLED='1' GOMOD='/dev/null' GOWORK='~/projects/sandbox/go_internal_package_issue/go.work' 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 arm64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -ffile-prefix-map=/var/folders/xk/mlc_37qd2jj8pcjkmsf9gqb40000gn/T/go-build302425133=/tmp/go-build -gno-record-gcc-switches -fno-common'
We made some project
. ├── go.work ├── module-a │ ├── go.mod │ └── internal │ └── test.go └── module-b ├── cmd │ └── main.go └── go.mod
I am not going to deep, but by coincidence we get
// module-a/go.mod module moduleA go 1.23
// module-b/go.mod module moduleA/moduleB go 1.23
so module B contains moduleA as part of its path in workspace
and, than, we do that
// module-b/cmd/main.go package main import "moduleA/internal" func main() { internal.Test() }
All is compiling and working
Should not even compiling, because moduleB is trying to call an internal function of moduleA
The text was updated successfully, but these errors were encountered:
Related Issues
(Emoji vote if this was helpful or unhelpful; more detailed feedback welcome in this discussion.)
Sorry, something went wrong.
Duplicate of #30569.
No branches or pull requests
Go version
go version go1.23.3 darwin/arm64
Output of
go env
in your module/workspace:What did you do?
We made some project
I am not going to deep, but by coincidence we get
so module B contains moduleA as part of its path in workspace
and, than, we do that
What did you see happen?
All is compiling and working
What did you expect to see?
Should not even compiling, because moduleB is trying to call an internal function of moduleA
The text was updated successfully, but these errors were encountered: