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.18beta2 linux/amd64
Yes.
go env
$ go env GO111MODULE="on" GOARCH="amd64" GOBIN="/home/manlio/.local/bin" GOCACHE="/home/manlio/.cache/go-build" GOENV="/home/manlio/.config/go/env" GOEXE="" GOEXPERIMENT="" GOFLAGS="" GOHOSTARCH="amd64" GOHOSTOS="linux" GOINSECURE="*.local" GOMODCACHE="/home/manlio/.local/lib/go/pkg/mod" GONOPROXY="" GONOSUMDB="*.local" GOOS="linux" GOPATH="/home/manlio/.local/lib/go:/home/manlio/src/go" GOPRIVATE="" GOPROXY="https://proxy.golang.org,direct" GOROOT="/home/manlio/sdk/go1.18beta2" GOSUMDB="sum.golang.org" GOTMPDIR="/tmp/gotmp" GOTOOLDIR="/home/manlio/sdk/go1.18beta2/pkg/tool/linux_amd64" GOVCS="" GOVERSION="go1.18beta2" GCCGO="gccgo" GOAMD64="v1" AR="ar" CC="gcc" CXX="g++" CGO_ENABLED="1" GOMOD="/dev/null" 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 -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/gotmp/go-build2069986986=/tmp/go-build -gno-record-gcc-switches" GOROOT/bin/go version: go version go1.18beta2 linux/amd64 GOROOT/bin/go tool compile -V: compile version go1.18beta2 uname -sr: Linux 5.16.3-arch1-1 /usr/lib/libc.so.6: GNU C Library (GNU libc) release release version 2.33. gdb --version: GNU gdb (GDB) 11.2
I have the following directory structure:
test.localhost/workspace/ go.work main/ go.mod main.go deps/ go.mod deps.go
go.work:
go.work
go 1.18 use ( deps main )
main/go.mod:
main/go.mod
module test.localhost/workspace/main go 1.18
main/main.go:
main/main.go
package main import ( "fmt" "test.localhost/workspace/deps" ) func main() { fmt.Println(deps.Do()) }
deps/go.mod:
deps/go.mod
module test.localhost/workspace/deps go 1.18
deps/deps.go:
deps/deps.go
package deps func Do() int { return 777 }
I ran, from the main directory, the command go mod tidy.
main
go mod tidy
Nothing.
The command ignored the go.work file and tried to fetch the test.localhost/workspace/deps module, failing with the error:
test.localhost/workspace/deps
go: finding module for package test.localhost/workspace/deps test.localhost/workspace/main imports test.localhost/workspace/deps: cannot find module providing package test.localhost/workspace/deps: unrecognized import path "test.localhost/workspace/deps": https fetch: Get "https://test.localhost/workspace/deps?go-get=1": dial tcp [::1]:443: connect: connection refused
The text was updated successfully, but these errors were encountered:
Duplicate of #50750
Sorry, something went wrong.
cleanup events
b08d1e8
needs golang/go#50750 or golang/go#51106
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?
I have the following directory structure:
go.work
:main/go.mod
:main/main.go
:deps/go.mod
:deps/deps.go
:I ran, from the
main
directory, the commandgo mod tidy
.What did you expect to see?
Nothing.
What did you see instead?
The command ignored the
go.work
file and tried to fetch thetest.localhost/workspace/deps
module, failing with the error:The text was updated successfully, but these errors were encountered: