This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision Next revision | Previous revision | ||
|
язык_программирования_golang [2024/12/02 09:27] val [Web приложение] |
язык_программирования_golang [2025/01/12 06:20] (current) val [golangci-lint] |
||
|---|---|---|---|
| Line 56: | Line 56: | ||
| * [[https://golangci-lint.run/welcome/quick-start/|golangci-lint.run quick-start]] | * [[https://golangci-lint.run/welcome/quick-start/|golangci-lint.run quick-start]] | ||
| + | * [[https://blog.ildarkarymov.ru/posts/linters/|golangci-lint и внедрение его в большой проект]] | ||
| <code> | <code> | ||
| $ go mod init gowebd | $ go mod init gowebd | ||
| + | или | ||
| + | $ cat go.mod | ||
| + | </code><code> | ||
| + | module gowebd | ||
| - | $ docker run --rm -v $(pwd):/app -w /app golangci/golangci-lint:v1.62.2 golangci-lint run --timeout=10m | + | go 1.19 |
| + | </code><code> | ||
| + | ~/gowebd# time docker run --rm -v $(pwd):/app -w /app golangci/golangci-lint:v1.62.2 golangci-lint run --timeout=10m | ||
| main.go:11:7: const `ver2` is unused (unused) | main.go:11:7: const `ver2` is unused (unused) | ||
| const ver2 = "ver1.3" | const ver2 = "ver1.3" | ||
| ^ | ^ | ||
| + | real 1m28.670s | ||
| </code> | </code> | ||