当前位置: 首页 > 工具软件 > GolangCI-Lint > 使用案例 >

Go golangci-lint安裝及使用

祁驰
2023-12-01

安裝 Install

Mac
範例環境:

macOS Big Sur
Go 1.16

在macOS可使用Homebrew安裝,在終端機輸入brew install golangci-lint開始安裝。

$ brew install golangci-lint
...
==> Installing dependencies for golangci-lint: go
==> Installing golangci-lint dependency: go
==> Pouring go--1.16.6.big_sur.bottle.tar.gz
��  /usr/local/Cellar/go/1.16.6: 9,960 files, 503.6MB
==> Installing golangci-lint
==> Pouring golangci-lint--1.42.0.big_sur.bottle.tar.gz
==> Caveats
Bash completion has been installed to:
  /usr/local/etc/bash_completion.d
==> Summary
��  /usr/local/Cellar/golangci-lint/1.42.0: 9 files, 27.5MB
==> Caveats
==> golangci-lint
Bash completion has been installed to:
  /usr/local/etc/bash_completion.d

安裝完後輸入golangci-lint --version檢視版本確認安裝。

$ golangci-lint --version
golangci
 类似资料: