mirror of
https://github.com/securego/gosec.git
synced 2025-03-01 12:43:28 +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
|
package main
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"flag"
|
||||||
"fmt"
|
"fmt"
|
||||||
"go/ast"
|
"go/ast"
|
||||||
"go/importer"
|
"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