vikunja-api/vendor/honnef.co/go/tools/cmd/gosimple/gosimple.go

22 lines
528 B
Go
Raw Normal View History

2018-12-28 23:15:05 +01:00
// gosimple detects code that could be rewritten in a simpler way.
package main // import "honnef.co/go/tools/cmd/gosimple"
import (
"os"
"honnef.co/go/tools/lint/lintutil"
"honnef.co/go/tools/simple"
)
func main() {
fs := lintutil.FlagSet("gosimple")
gen := fs.Bool("generated", false, "Check generated code")
fs.Parse(os.Args[1:])
c := simple.NewChecker()
c.CheckGenerated = *gen
cfg := lintutil.CheckerConfig{
Checker: c,
ExitNonZero: true,
}
lintutil.ProcessFlagSet([]lintutil.CheckerConfig{cfg}, fs)
}