diff --git a/main.go b/main.go index 01e24fe..7bce9f4 100644 --- a/main.go +++ b/main.go @@ -44,6 +44,11 @@ func main() { os.Exit(-1) } + if !shell.Exists("go.sum") { + shell.Run([]string{"go", "mod", "init"}) + shell.Run([]string{"go", "mod", "tidy"}) + } + cmd := []string{"go", "list", "-f", "'{{.Name}}'"} result := shell.Run(cmd)