diff options
| -rw-r--r-- | main.go | 15 |
1 files changed, 15 insertions, 0 deletions
@@ -62,6 +62,21 @@ func main() { os.Exit(-1) } + if path, err := fhelp.CheckCmd("goimports"); err != nil { + log.Info("this tool requires goimports") + if path != "" { + log.Info("path might be:", path) + } + log.Info("this tool requires goimports") + cmd := []string{"go", "install", "-v", "-x", "golang.org/x/tools/cmd/goimports@latest"} + log.Info("Need to run:", cmd) + if fhelp.QuestionUser("build goimports?") { + shell.RunRealtime(cmd) + } else { + os.Exit(-1) + } + } + doProto(argv.Proto) } |
