summaryrefslogtreecommitdiff
path: root/main.go
diff options
context:
space:
mode:
Diffstat (limited to 'main.go')
-rw-r--r--main.go5
1 files changed, 5 insertions, 0 deletions
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)