From 8fcf500a802e93ae315b6c0c59a7cd9d2ecaae7e Mon Sep 17 00:00:00 2001 From: Jeff Carr Date: Fri, 29 Nov 2024 15:51:04 -0600 Subject: [PATCH] run go mod init and tidy Signed-off-by: Jeff Carr --- main.go | 5 +++++ 1 file changed, 5 insertions(+) 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)