profile
viewpoint

Ask questionsgo get cmd/golangci-lint fails on Go 1.13 (tip) which uses proxy.golang.org (HTTP error 410 Gone)

  1. Go environment: go version && go env

go version output:

go version devel +bc593eac2d Mon Jul 1 14:45:49 2019 +0000 linux/amd64

go env output:

GO111MODULE="on"
GOARCH="amd64"
GOBIN=""
GOCACHE="/home/u/.cache/go-build"
GOENV="/home/u/.config/go/env"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GONOPROXY=""
GONOSUMDB=""
GOOS="linux"
GOPATH="/home/u/goget:/home/u/Desktop/go"
GOPRIVATE=""
GOPROXY="https://proxy.golang.org,direct"
GOROOT="/home/u/go1.13"
GOSUMDB="sum.golang.org"
GOTMPDIR=""
GOTOOLDIR="/home/u/go1.13/pkg/tool/linux_amd64"
GCCGO="gccgo"
AR="ar"
CC="gcc"
CXX="g++"
CGO_ENABLED="1"
GOMOD="/dev/null"
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-build741963370=/tmp/go-build -gno-record-gcc-switches"

On the latest version of Go (which uses proxy.golang.org) it seems like go get is resulting in a 410 HTTP error.

$ go get github.com/golangci/golangci-lint/cmd/golangci-lint
go: finding github.com/golangci/golangci-lint/cmd/golangci-lint latest
verifying github.com/go-critic/go-critic@v0.0.0-20181204210945-1df300866540/go.mod: github.com/go-critic/go-critic@v0.0.0-20181204210945-1df300866540/go.mod: reading https://sum.golang.org/lookup/github.com/go-critic/go-critic@v0.0.0-20181204210945-1df300866540: 410 Gone
golangci/golangci-lint

Answer questions mewmew

Related to this issue, on our CI builds we've started to notice 400 HTTP error (Bad Request) reported by proxy.golang.org for the go-critic dependency of golangci-lint.

ref: https://travis-ci.org/llir/llvm/jobs/552889788

$ go get github.com/golangci/golangci-lint/cmd/golangci-lint
go: finding github.com/mattn/goveralls v0.0.2
go: downloading github.com/mattn/goveralls v0.0.2
go: extracting github.com/mattn/goveralls v0.0.2
go: finding github.com/golangci/golangci-lint/cmd/golangci-lint latest
go: finding github.com/golangci/golangci-lint v1.17.1
go: downloading github.com/golangci/golangci-lint v1.17.1
go: extracting github.com/golangci/golangci-lint v1.17.1
go get: github.com/golangci/golangci-lint@v1.17.1 requires
	github.com/go-critic/go-critic@v0.0.0-20181204210945-1df300866540: reading https://proxy.golang.org/github.com/go-critic/go-critic/@v/v0.0.0-20181204210945-1df300866540.mod: 400 Bad Request
The command "go get github.com/golangci/golangci-lint/cmd/golangci-lint" failed and exited with 1 during .

Edit: It seems like other dependencies of golangci-lint have similar issues when using proxy.golang.org:

$ go get github.com/golangci/golangci-lint/cmd/golangci-lint
go: finding github.com/golangci/golangci-lint/cmd/golangci-lint latest
verifying github.com/golangci/ineffassign@v0.0.0-20180808204949-42439a7714cc/go.mod: github.com/golangci/ineffassign@v0.0.0-20180808204949-42439a7714cc/go.mod: reading https://sum.golang.org/lookup/github.com/golangci/ineffassign@v0.0.0-20180808204949-42439a7714cc: 410 Gone
useful!

Related questions

confusing error message "File is not goimports-ed (goimports)" hot 3
confusing error message "File is not goimports-ed (goimports)" - golangci-lint hot 2
please surpport ignore someOne fuction's igored error hot 1
Setting GO111MODULE=on for golangci.com hot 1
golangci-lint "DecodeRune not declared by package utf8" with golang 1.13 hot 1
Cannot `go get` due to invalid pseudo-version hot 1
Install golangci-lint locally using Windows hot 1
Golangci-lint Incompatibility with newer versions of Go? hot 1
panic on bodyclose hot 1
concurrent map access on 1.17.1 hot 1
[Feature] TODO/FIXME linter hot 1
Failed to build golangci-lint v1.17.1 when enable GO111MODULE hot 1
Build errors using Go 1.13 hot 1
BUG: failed run hot 1
confusing error message "File is not goimports-ed (goimports)" hot 1
source:https://uonfu.com/
Github User Rank List