From de3b63c1b01c70181018b0676258977c3b25ea78 Mon Sep 17 00:00:00 2001 From: Jeff Carr Date: Fri, 29 Nov 2024 21:49:11 -0600 Subject: [PATCH] golang 1.20 should be new enough --- Makefile | 1 + main.go | 2 ++ 2 files changed, 3 insertions(+) diff --git a/Makefile b/Makefile index c6d6a61..146b125 100644 --- a/Makefile +++ b/Makefile @@ -28,6 +28,7 @@ redomod: rm -f go.* GO111MODULE= go mod init GO111MODULE= go mod tidy + go mod edit -go=1.20 reset: # clear your terminal diff --git a/main.go b/main.go index 7bce9f4..a0575eb 100644 --- a/main.go +++ b/main.go @@ -1,3 +1,4 @@ +// +build go1.20 package main import ( @@ -47,6 +48,7 @@ func main() { if !shell.Exists("go.sum") { shell.Run([]string{"go", "mod", "init"}) shell.Run([]string{"go", "mod", "tidy"}) + shell.Run([]string{"go", "mod", "edit", "-go=1.20"}) } cmd := []string{"go", "list", "-f", "'{{.Name}}'"}