1 Star 0 Fork 0

goproxies/github.com-alecthomas-gometalinter

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
main.go 715 Bytes
一键复制 编辑 原始数据 按行查看 历史
package main // import "4d63.com/gochecknoinits"
import (
"flag"
"fmt"
"os"
)
func main() {
flagPrintHelp := flag.Bool("help", false, "")
flag.Usage = func() {
fmt.Fprintf(os.Stderr, "Usage: gochecknoinits [path] [path] ...\n")
}
flag.Parse()
if *flagPrintHelp {
flag.Usage()
return
}
paths := flag.Args()
if len(paths) == 0 {
paths = []string{"./..."}
}
exitWithError := false
for _, path := range paths {
messages, err := checkNoInits(path)
for _, message := range messages {
fmt.Fprintf(os.Stdout, "%s\n", message)
exitWithError = true
}
if err != nil {
fmt.Fprintf(os.Stderr, "error: %s\n", err)
exitWithError = true
}
}
if exitWithError {
os.Exit(1)
}
}
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/goproxies/github.com-alecthomas-gometalinter.git
git@gitee.com:goproxies/github.com-alecthomas-gometalinter.git
goproxies
github.com-alecthomas-gometalinter
github.com-alecthomas-gometalinter
v2.0.12

搜索帮助

0d507c66 1850385 C8b1a773 1850385