summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--argv.go2
-rw-r--r--redoGoMod.go8
2 files changed, 5 insertions, 5 deletions
diff --git a/argv.go b/argv.go
index 571c26f..3a80510 100644
--- a/argv.go
+++ b/argv.go
@@ -26,7 +26,7 @@ func (a args) Description() string {
go-mod-clean will try to verify your go.* files are using the newest package versions
* Recreate go.* with 'go mod init' and 'go mod tidy'
-* Set your required go in go.mod (default is go1.20
+* Set your required go in go.mod (default is go1.21
* Check that the most recent master branch versions are used
* Try to trim go.sum of non-existent entries
`
diff --git a/redoGoMod.go b/redoGoMod.go
index 3af8663..d74addd 100644
--- a/redoGoMod.go
+++ b/redoGoMod.go
@@ -21,7 +21,7 @@ func eraseGoMod(repo *gitpb.Repo) {
// sets the required golang version in go.mod
func setGoVersion(repo *gitpb.Repo, version string) error {
- // most things should build with golang after 1.20
+ // most things should build with golang after 1.21
if err := repo.StrictRun([]string{"go", "mod", "edit", "-go=" + version}); err != nil {
log.Warn(repo.GoPath, "go mod edit failed", err)
return err
@@ -41,13 +41,13 @@ func redoGoMod(repo *gitpb.Repo) error {
log.Warn("go mod init failed", err)
return err
}
- if err := repo.StrictRun([]string{"go", "mod", "tidy"}); err != nil {
+ if err := repo.StrictRun([]string{"go", "mod", "tidy", "-go=1.21"}); err != nil {
log.Warn("go mod tidy failed", err)
return err
}
- // most things should build with golang after 1.20 // todo: allow this to be set somewhere
- if err := setGoVersion(repo, "1.20"); err != nil {
+ // most things should build with golang after 1.21 // todo: allow this to be set somewhere
+ if err := setGoVersion(repo, "1.21"); err != nil {
log.Warn(repo.GoPath, "go mod edit failed", err)
return err
}