move utils to separate executable

This commit is contained in:
Grant Murphy 2017-12-28 16:55:12 +10:00
parent e925d3c347
commit 4c49716f0e

View file

@ -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)
}
}