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
$ go version go version go1.19 darwin/amd64
Yes.
go env
$ go env GO111MODULE="" GOARCH="amd64" GOBIN="" GOCACHE="/Users/joe.davidson/Library/Caches/go-build" GOENV="/Users/joe.davidson/Library/Application Support/go/env" GOEXE="" GOEXPERIMENT="" GOFLAGS="" GOHOSTARCH="amd64" GOHOSTOS="darwin" GOINSECURE="" GOMODCACHE="/Users/joe.davidson/go/pkg/mod" GONOPROXY="github.com/aviva-verde" GONOSUMDB="github.com/aviva-verde" GOOS="darwin" GOPATH="/Users/joe.davidson/go" GOPRIVATE="github.com/aviva-verde" GOPROXY="https://proxy.golang.org,direct" GOROOT="/nix/store/y22ivsh46ikx5y3ijwadw7s7655c3jn2-go-1.19/opt/go" GOSUMDB="sum.golang.org" GOTMPDIR="" GOTOOLDIR="/nix/store/y22ivsh46ikx5y3ijwadw7s7655c3jn2-go-1.19/opt/go/pkg/tool/darwin_amd64" GOVCS="" GOVERSION="go1.19" GCCGO="gccgo" GOAMD64="v1" AR="ar" CC="clang" CXX="clang++" CGO_ENABLED="1" GOMOD="/Users/joe.davidson/src/sync/go.mod" GOWORK="" CGO_CFLAGS="-g -O2" CGO_CPPFLAGS="" CGO_CXXFLAGS="-g -O2" CGO_FFLAGS="-g -O2" CGO_LDFLAGS="-g -O2" PKG_CONFIG="pkg-config" GOGCCFLAGS="-fPIC -arch x86_64 -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/var/folders/2m/sl1qb3591xv98xct52dr40nr0000gn/T/go-build2415660171=/tmp/go-build -gno-record-gcc-switches -fno-common"
Create a module with the same name as a std library package, e.g. sync.
sync
$ go mod init sync go: creating new go.mod: module sync $ echo "package somepackage import \"testing\" func TestFunc(*testing.T) { panic("error") }" > some_test.go $ go test ./...
Some error, whether that be a warning that the module has a conflicting name or the test failing.
The tests pass, because the test command is actually running sync from the standard library.
$ go test PASS ok sync 1.929s
The text was updated successfully, but these errors were encountered:
Duplicate of #26227
Sorry, something went wrong.
No branches or pull requests
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
Yes.
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
Create a module with the same name as a std library package, e.g.
sync
.What did you expect to see?
Some error, whether that be a warning that the module has a conflicting name or the test failing.
What did you see instead?
The tests pass, because the test command is actually running
sync
from the standard library.The text was updated successfully, but these errors were encountered: