summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2024-11-29 15:51:04 -0600
committerJeff Carr <[email protected]>2024-11-29 15:51:04 -0600
commit8fcf500a802e93ae315b6c0c59a7cd9d2ecaae7e (patch)
tree1d653fdf01c342814ba32e84e0ae8c67f24e616f
parenta40f961924f6d9fa897f1c48b1ed5e021ef6f590 (diff)
run go mod init and tidy
Signed-off-by: Jeff Carr <[email protected]>
-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)