golang 1.20 should be new enough

This commit is contained in:
Jeff Carr 2024-11-29 21:49:11 -06:00
parent 58f595f10f
commit de3b63c1b0
2 changed files with 3 additions and 0 deletions

View File

@ -28,6 +28,7 @@ redomod:
rm -f go.* rm -f go.*
GO111MODULE= go mod init GO111MODULE= go mod init
GO111MODULE= go mod tidy GO111MODULE= go mod tidy
go mod edit -go=1.20
reset: reset:
# clear your terminal # clear your terminal

View File

@ -1,3 +1,4 @@
// +build go1.20
package main package main
import ( import (
@ -47,6 +48,7 @@ func main() {
if !shell.Exists("go.sum") { if !shell.Exists("go.sum") {
shell.Run([]string{"go", "mod", "init"}) shell.Run([]string{"go", "mod", "init"})
shell.Run([]string{"go", "mod", "tidy"}) shell.Run([]string{"go", "mod", "tidy"})
shell.Run([]string{"go", "mod", "edit", "-go=1.20"})
} }
cmd := []string{"go", "list", "-f", "'{{.Name}}'"} cmd := []string{"go", "list", "-f", "'{{.Name}}'"}