This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision Next revision | Previous revision | ||
|
язык_программирования_golang [2024/11/29 15:38] val |
язык_программирования_golang [2025/01/12 06:20] (current) val [golangci-lint] |
||
|---|---|---|---|
| Line 53: | Line 53: | ||
| student@client1:~/gowebd$ sudo /usr/local/sbin/gowebd | student@client1:~/gowebd$ sudo /usr/local/sbin/gowebd | ||
| </code> | </code> | ||
| - | ===== Web приложение ===== | + | ===== golangci-lint ===== |
| + | |||
| + | * [[https://golangci-lint.run/welcome/quick-start/|golangci-lint.run quick-start]] | ||
| + | * [[https://blog.ildarkarymov.ru/posts/linters/|golangci-lint и внедрение его в большой проект]] | ||
| <code> | <code> | ||
| - | docker run --rm -v $(pwd):/app -w /app golangci/golangci-lint:v1.62.2 golangci-lint run --timeout=10m | + | $ go mod init gowebd |
| + | или | ||
| + | $ cat go.mod | ||
| + | </code><code> | ||
| + | module gowebd | ||
| + | |||
| + | 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> | ||