@@ -54,8 +54,8 @@ The recommended way to install golangci-lint (replace `vX.Y.Z` with the latest
5454version from the [ releases page] ( https://github.com/golangci/golangci-lint/releases ) ):
5555
5656``` bash
57- # binary will be $GOPATH/bin/golangci-lint
58- curl -sfL https://install.goreleaser.com/github.com/golangci/golangci-lint.sh | sh -s -- -b $GOPATH /bin vX.Y.Z
57+ # binary will be $(go env GOPATH) /bin/golangci-lint
58+ curl -sfL https://install.goreleaser.com/github.com/golangci/golangci-lint.sh | sh -s -- -b $( go env GOPATH) /bin vX.Y.Z
5959
6060# or install it into ./bin/
6161curl -sfL https://install.goreleaser.com/github.com/golangci/golangci-lint.sh | sh -s vX.Y.Z
@@ -69,8 +69,8 @@ golangci-lint --version
6969As a fallback you can also use ` raw.githubusercontent.com `
7070
7171``` bash
72- # binary will be $GOPATH/bin/golangci-lint
73- curl -sfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh| sh -s -- -b $GOPATH /bin vX.Y.Z
72+ # binary will be $(go env GOPATH) /bin/golangci-lint
73+ curl -sfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh| sh -s -- -b $( go env GOPATH) /bin vX.Y.Z
7474
7575# or install it into ./bin/
7676curl -sfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh| sh -s vX.Y.Z
@@ -91,7 +91,7 @@ It's a not recommended for your CI pipeline. Only install like this for your loc
9191
9292``` bash
9393go get -u github.com/golangci/golangci-lint
94- cd $GOPATH /src/github.com/golangci/golangci-lint/cmd/golangci-lint
94+ cd $( go env GOPATH) /src/github.com/golangci/golangci-lint/cmd/golangci-lint
9595go install -ldflags " -X 'main.version=$( git describe --tags) ' -X 'main.commit=$( git rev-parse --short HEAD) ' -X 'main.date=$( date) '"
9696```
9797
0 commit comments