方式一:使用命令: go get -u github.com/golangci/golangci-lint/cmd/golangci-lint 方式二:离线安装:https://github.com/golangci/golangci-lint/releases 简单使用 golangci-lint run [目录]/[文件] golangci-lint run ./... golangci-lint run dir1 dir2/... dir3/file1.go 支持的linter ...