Skip to content

Commit 344e1e6

Browse files
authored
Merge pull request #102 from github/git-systems/upgrade-go-version
Upgrade Go to the 1.24 version
2 parents 6e8d103 + ad14648 commit 344e1e6

File tree

5 files changed

+13
-6
lines changed

5 files changed

+13
-6
lines changed

.github/workflows/golangci-lint.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,11 @@ jobs:
1414
- uses: actions/checkout@v4
1515
- uses: actions/setup-go@v5
1616
with:
17-
go-version: "1.21"
17+
go-version: "1.24"
1818
- name: Vendor modules for later steps.
1919
run: |
2020
go mod vendor
21-
- uses: golangci/golangci-lint-action@3a919529898de77ec3da873e3063ca4b10e7f5cc # v3.7.0
21+
- uses: golangci/golangci-lint-action@2226d7cb06a077cd73e56eedd38eecad18e5d837 # v6.5.0
2222
with:
2323
# Required: the version of golangci-lint is required and must be specified without patch version: we always use the latest patch version.
24-
version: v1.55
24+
version: v1.64

go.mod

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
module github.com/github/spokes-receive-pack
22

3-
go 1.20
3+
go 1.24
44

55
require (
66
github.com/github/go-pipe v1.0.2

go.sum

+2
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORN
88
github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ=
99
github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI=
1010
github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY=
11+
github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE=
1112
github.com/pingcap/errors v0.11.4 h1:lFuQV/oaUMGcD2tqt+01ROSmJs75VG1ToEOkZIZ4nE4=
1213
github.com/pingcap/errors v0.11.4/go.mod h1:Oi8TUi2kEtXXLMJk9l1cGmz20kV3TaQ0usTwv5KuLY8=
1314
github.com/pingcap/failpoint v0.0.0-20220801062533-2eaa32854a6c h1:CgbKAHto5CQgWM9fSBIvaxsJHuGP0uM74HXtv3MyyGQ=
@@ -24,6 +25,7 @@ github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsT
2425
github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY=
2526
go.uber.org/goleak v1.1.10/go.mod h1:8a7PlsEVH3e/a/GLqe5IIrQx6GzcnRmZEufDUTk4A7A=
2627
go.uber.org/goleak v1.2.0 h1:xqgm/S+aQvhWFTtR0XK3Jvg7z8kGV8P4X14IzwN3Eqk=
28+
go.uber.org/goleak v1.2.0/go.mod h1:XJYK+MuIchqpmGmUSAzotztawfKvYLUIgg7guXrwVUo=
2729
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
2830
golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc=
2931
golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=

internal/integration/parse.go

+5
Original file line numberDiff line numberDiff line change
@@ -164,6 +164,11 @@ func readPktline(r io.Reader) ([]byte, error) {
164164

165165
func writePktlinef(w io.Writer, format string, args ...interface{}) error {
166166
msg := fmt.Sprintf(format, args...)
167+
err := writePktline(w, msg)
168+
return err
169+
}
170+
171+
func writePktline(w io.Writer, msg string) error {
167172
_, err := fmt.Fprintf(w, "%04x%s", 4+len(msg), msg)
168173
return err
169174
}

internal/integration/pushoptions_test.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -126,8 +126,8 @@ func TestPushOptionsLimitCount(t *testing.T) {
126126

127127
// the limit is 2, let's send 3 push options
128128
for i := 0; i < 3; i++ {
129-
require.NoError(t, writePktlinef(srpIn,
130-
fmt.Sprintf("option-%d\n", i)))
129+
option := fmt.Sprintf("option-%d\n", i)
130+
require.NoError(t, writePktline(srpIn, option))
131131
}
132132
_, err = srpIn.Write([]byte("0000"))
133133
require.NoError(t, err)

0 commit comments

Comments
 (0)