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.11.2 linux/amd64
yes
Tested with
docker run --rm -v $(pwd):/app -it golang:1.11.4 /bin/bash
go env
$ go env GOARCH="amd64" GOBIN="" GOCACHE="/home/firefart/.cache/go-build" GOEXE="" GOFLAGS="" GOHOSTARCH="amd64" GOHOSTOS="linux" GOOS="linux" GOPATH="/home/firefart/go" GOPROXY="" GORACE="" GOROOT="/usr/lib/golang" GOTMPDIR="" GOTOOLDIR="/usr/lib/golang/pkg/tool/linux_amd64" GCCGO="gccgo" CC="gcc" CXX="g++" CGO_ENABLED="1" GOMOD="" 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/go-build670649339=/tmp/go-build -gno-record-gcc-switches"
main.go
package main import "fmt" func main() { fmt.Println("Test") }
go.mod
module github.com/user/project/v3
According to https://github.com/golang/go/wiki/Modules#releasing-modules-v2-or-higher we have to add the /v3/ for versions bigger than two which has been done here. After a go build or go build ./... the build finishes but produces a binary named v3 instead of project
/v3/
go build
go build ./...
v3
project
the name extracted from go.mod should have semantic versions stripped. In this case the binary name should be project
the binary is built as v3
The text was updated successfully, but these errors were encountered:
Duplicate of #27283.
Sorry, something went wrong.
Thanks didn't find this issue when searching for it
No branches or pull requests
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
yes
Tested with
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
main.go
go.mod
According to https://github.com/golang/go/wiki/Modules#releasing-modules-v2-or-higher we have to add the
/v3/
for versions bigger than two which has been done here. After ago build
orgo build ./...
the build finishes but produces a binary namedv3
instead ofproject
What did you expect to see?
the name extracted from go.mod should have semantic versions stripped. In this case the binary name should be
project
What did you see instead?
the binary is built as
v3
The text was updated successfully, but these errors were encountered: