Skip to content

Commit 7dc21d1

Browse files
authored
Bump CLI go version to 1.26 and update lib versions (#1231)
1 parent 447d5df commit 7dc21d1

7 files changed

Lines changed: 72 additions & 506 deletions

File tree

.github/workflows/ci.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,7 @@ jobs:
1818
fail-fast: false
1919
matrix:
2020
go-version:
21-
- '1.20.x'
22-
- '1.21.x'
21+
- '1.26.x'
2322
os: [ubuntu-latest, windows-latest, macOS-latest]
2423

2524
steps:

.github/workflows/release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ jobs:
2222
- name: Set up Go
2323
uses: actions/setup-go@f111f3307d8850f501ac008e886eec1fd1932a34 # v5.3.0
2424
with:
25-
go-version: '1.20.x'
25+
go-version: '1.26.x'
2626

2727
- name: Import GPG Key
2828
id: import_gpg

CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ Exercism would be impossible without people like you being willing to spend time
88

99
## Dependencies
1010

11-
You'll need Go version 1.20 or higher. Follow the directions on http://golang.org/doc/install
11+
You'll need Go version 1.26 or higher. Follow the directions on http://golang.org/doc/install
1212

1313
## Development
1414

cli/cli.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import (
66
"bytes"
77
"compress/gzip"
88
"encoding/json"
9+
"errors"
910
"fmt"
1011
"io"
1112
"net/http"
@@ -14,7 +15,7 @@ import (
1415
"strings"
1516
"time"
1617

17-
"github.com/blang/semver"
18+
semver "github.com/blang/semver/v4"
1819
"github.com/exercism/cli/debug"
1920
update "github.com/inconshreveable/go-update"
2021
)
@@ -150,7 +151,7 @@ func (c *CLI) fetchLatestRelease() error {
150151
for k, v := range resp.Header {
151152
msg += fmt.Sprintf("\n %s:\n %s", k, v)
152153
}
153-
return fmt.Errorf(msg)
154+
return errors.New(msg)
154155
}
155156

156157
var rel Release

cmd/submit.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,7 @@ func (s *submitCmdContext) migrateLegacyMetadata(exercise workspace.Exercise) er
208208
return err
209209
}
210210
if verbose, _ := s.flags.GetBool("verbose"); verbose {
211-
fmt.Fprintf(Err, migrationStatus.String())
211+
Err.Write([]byte(migrationStatus.String()))
212212
}
213213
return nil
214214
}

go.mod

Lines changed: 18 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,31 @@
11
module github.com/exercism/cli
22

3-
go 1.20
3+
go 1.26.0
44

55
require (
6-
github.com/blang/semver v3.5.1+incompatible
6+
github.com/blang/semver/v4 v4.0.0
77
github.com/inconshreveable/go-update v0.0.0-20160112193335-8152e7eb6ccf
8-
github.com/spf13/cobra v1.7.0
9-
github.com/spf13/pflag v1.0.5
10-
github.com/spf13/viper v1.15.0
11-
github.com/stretchr/testify v1.8.4
12-
golang.org/x/net v0.23.0
13-
golang.org/x/text v0.14.0
8+
github.com/spf13/cobra v1.10.0
9+
github.com/spf13/pflag v1.0.10
10+
github.com/spf13/viper v1.21.0
11+
github.com/stretchr/testify v1.11.1
12+
golang.org/x/net v0.55.0
13+
golang.org/x/text v0.37.0
1414
)
1515

1616
require (
1717
github.com/davecgh/go-spew v1.1.1 // indirect
18-
github.com/fsnotify/fsnotify v1.6.0 // indirect
19-
github.com/hashicorp/hcl v1.0.0 // indirect
18+
github.com/fsnotify/fsnotify v1.9.0 // indirect
19+
github.com/go-viper/mapstructure/v2 v2.4.0 // indirect
2020
github.com/inconshreveable/mousetrap v1.1.0 // indirect
21-
github.com/magiconair/properties v1.8.7 // indirect
22-
github.com/mitchellh/mapstructure v1.5.0 // indirect
23-
github.com/pelletier/go-toml/v2 v2.0.6 // indirect
21+
github.com/pelletier/go-toml/v2 v2.2.4 // indirect
2422
github.com/pmezard/go-difflib v1.0.0 // indirect
25-
github.com/spf13/afero v1.9.3 // indirect
26-
github.com/spf13/cast v1.5.0 // indirect
27-
github.com/spf13/jwalterweatherman v1.1.0 // indirect
28-
github.com/subosito/gotenv v1.4.2 // indirect
29-
golang.org/x/sys v0.18.0 // indirect
30-
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c // indirect
31-
gopkg.in/ini.v1 v1.67.0 // indirect
23+
github.com/sagikazarmark/locafero v0.11.0 // indirect
24+
github.com/sourcegraph/conc v0.3.1-0.20240121214520-5f936abd7ae8 // indirect
25+
github.com/spf13/afero v1.15.0 // indirect
26+
github.com/spf13/cast v1.10.0 // indirect
27+
github.com/subosito/gotenv v1.6.0 // indirect
28+
go.yaml.in/yaml/v3 v3.0.4 // indirect
29+
golang.org/x/sys v0.45.0 // indirect
3230
gopkg.in/yaml.v3 v3.0.1 // indirect
3331
)

0 commit comments

Comments
 (0)