You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is working as expected. In general import paths should either be in the standard library or should start with a domain name. In effect the go tool treats all paths starting with "mod" as being in the standard library, but none of those paths may be imported.
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
i don't know ,first use module, mac down but linux works well with the same situation
What operating system and processor architecture are you using (
go env
)?$ go env
GO111MODULE="on"
GOARCH="amd64"
GOBIN=""
GOCACHE="/Users/crusj/Library/Caches/go-build"
GOENV="/Users/crusj/Library/Application Support/go/env"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="darwin"
GONOPROXY=""
GONOSUMDB=""
GOOS="darwin"
GOPATH="/Users/crusj/go"
GOPRIVATE=""
GOPROXY="https://proxy.golang.org,direct"
GOROOT="/usr/local/go"
GOSUMDB="sum.golang.org"
GOTMPDIR=""
GOTOOLDIR="/usr/local/go/pkg/tool/darwin_amd64"
GCCGO="gccgo"
AR="ar"
CC="clang"
CXX="clang++"
CGO_ENABLED="1"
GOMOD="/Users/crusj/go/src/micro/go.mod"
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/var/folders/x8/v_x56q612ml4rk7b51lmy5140000gn/T/go-build739983740=/tmp/go-build -gno-record-gcc-switches -fno-common"
go env
OutputWhat did you do?
go run main.go
├── go.mod
├── go.sum
├── main.go
└── test
└── test.go
main.go
test.go
go.mod
What did you expect to see?
111
What did you see instead?
package main
imports mod/test: disallowed import path "mod/test"
The text was updated successfully, but these errors were encountered: