deferlint:Linter在Go循环中查找延迟语句

时间:2021-03-11 05:30:22
【文件属性】:
文件名称:deferlint:Linter在Go循环中查找延迟语句
文件大小:4KB
文件格式:ZIP
更新时间:2021-03-11 05:30:22
Go 去铁蛋白 当在循环中使用defer时,此程序包会发出警告。 例子 $ go get github.com/eatonphil/deferlint $ go vet -vettool=/Users/philipeaton/go/bin/deferlint ./tests # github.com/eatonphil/deferlint/tests tests/deferloop.go:7:3: defer in loop found " defer f() " 参考
【文件预览】:
deferlint-master
----cmd()
--------deferlint()
----tests()
--------deferloop.go(65B)
----.gitignore(5B)
----go.sum(723B)
----README.md(336B)
----LICENSE.MD(1KB)
----deferlint.go(1KB)
----go.mod(113B)

网友评论