diff options
| author | Jeff Carr <[email protected]> | 2025-10-16 05:42:51 -0500 |
|---|---|---|
| committer | Jeff Carr <[email protected]> | 2025-10-16 05:42:51 -0500 |
| commit | a553f3eeee489d762a740f2416cc7906a2bdb6db (patch) | |
| tree | fb0f552ac13aa1ca54cd59f02f34f6c426e510a5 /main.go | |
| parent | 30e8de23f6ae78136e93add8e1464da5e45b020e (diff) | |
check for goimports. autogenpb needs it
Diffstat (limited to 'main.go')
| -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) } |
