@@ -45,13 +45,13 @@ Here is the other way to install golangci-lint:
45
45
46
46
` ` ` bash
47
47
# binary will be $(go env GOPATH)/bin/golangci-lint
48
- curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/HEAD/install.sh | sh -s -- -b $(go env GOPATH)/bin {.LatestVersion }
48
+ curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/HEAD/install.sh | sh -s -- -b $(go env GOPATH)/bin {{< latest-version >} }
49
49
50
50
# or install it into ./bin/
51
- curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/HEAD/install.sh | sh -s {.LatestVersion }
51
+ curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/HEAD/install.sh | sh -s {{< latest-version >} }
52
52
53
53
# In Alpine Linux (as it does not come with curl by default)
54
- wget -O- -nv https://raw.githubusercontent.com/golangci/golangci-lint/HEAD/install.sh | sh -s {.LatestVersion }
54
+ wget -O- -nv https://raw.githubusercontent.com/golangci/golangci-lint/HEAD/install.sh | sh -s {{< latest-version >} }
55
55
56
56
golangci-lint --version
57
57
```
@@ -67,7 +67,7 @@ For any problems with golangci-lint, check out recent [GitHub issues](https://gi
67
67
68
68
``` bash
69
69
# binary will be $(go env GOPATH)/bin/golangci-lint
70
- curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/HEAD/install.sh | sh -s -- -b $( go env GOPATH) /bin {.LatestVersion }
70
+ curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/HEAD/install.sh | sh -s -- -b $( go env GOPATH) /bin {{ < latest-version > } }
71
71
72
72
golangci-lint --version
73
73
```
@@ -135,12 +135,12 @@ The scoop package is not officially maintained by golangci team.
135
135
### Docker
136
136
137
137
``` bash
138
- docker run --rm -v $( pwd) :/app -w /app golangci/golangci-lint:{.LatestVersion } golangci-lint run
138
+ docker run --rm -v $( pwd) :/app -w /app golangci/golangci-lint:{{ < latest-version > } } golangci-lint run
139
139
```
140
140
141
141
Colored output:
142
142
``` bash
143
- docker run -t --rm -v $( pwd) :/app -w /app golangci/golangci-lint:{.LatestVersion } golangci-lint run
143
+ docker run -t --rm -v $( pwd) :/app -w /app golangci/golangci-lint:{{ < latest-version > } } golangci-lint run
144
144
```
145
145
146
146
Preserving caches between consecutive runs:
@@ -150,7 +150,7 @@ docker run --rm -t -v $(pwd):/app -w /app \
150
150
-v $( go env GOCACHE) :/.cache/go-build -e GOCACHE=/.cache/go-build \
151
151
-v $( go env GOMODCACHE) :/.cache/mod -e GOMODCACHE=/.cache/mod \
152
152
-v ~ /.cache/golangci-lint:/.cache/golangci-lint -e GOLANGCI_LINT_CACHE=/.cache/golangci-lint \
153
- golangci/golangci-lint:{.LatestVersion } golangci-lint run
153
+ golangci/golangci-lint:{{ < latest-version > } } golangci-lint run
154
154
```
155
155
156
156
### Install from Sources
@@ -170,7 +170,7 @@ These installations aren't recommended because of the following points:
170
170
7 . It's slower than binary installation.
171
171
172
172
``` bash
173
- go install github.com/golangci/golangci-lint/v2/cmd/golangci-lint@{.LatestVersion }
173
+ go install github.com/golangci/golangci-lint/v2/cmd/golangci-lint@{{ < latest-version > } }
174
174
```
175
175
176
176
{{% details title="` go tool ` usage recommendations" closed="true" %}}
@@ -196,7 +196,7 @@ go mod init -modfile=golangci-lint.mod <your_module_path>/golangci-lint
196
196
197
197
``` sh
198
198
# Add golangci-lint as a tool
199
- go get -tool -modfile=golangci-lint.mod github.com/golangci/golangci-lint/v2/cmd/golangci-lint@{.LatestVersion }
199
+ go get -tool -modfile=golangci-lint.mod github.com/golangci/golangci-lint/v2/cmd/golangci-lint@{{ < latest-version > } }
200
200
```
201
201
202
202
``` sh
0 commit comments