mirror of
https://github.com/securego/gosec.git
synced 2025-03-01 04:33:29 +00:00
move utils to separate executable
This commit is contained in:
parent
e925d3c347
commit
4c49716f0e
1 changed files with 12 additions and 0 deletions
|
@ -15,6 +15,7 @@
|
|||
package main
|
||||
|
||||
import (
|
||||
"flag"
|
||||
"fmt"
|
||||
"go/ast"
|
||||
"go/importer"
|
||||
|
@ -274,3 +275,14 @@ func dumpImports(files ...string) {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
func main() {
|
||||
tools := newUtils()
|
||||
flag.Var(tools, "tool", "Utils to assist with rule development")
|
||||
flag.Parse()
|
||||
|
||||
if len(tools.call) > 0 {
|
||||
tools.run(flag.Args()...)
|
||||
os.Exit(0)
|
||||
}
|
||||
}
|
Loading…
Reference in a new issue