Skip to content

Commit 51062fc

Browse files
authored
Go 1.23 upgrade. (#23)
1 parent 6c77757 commit 51062fc

File tree

5 files changed

+16
-16
lines changed

5 files changed

+16
-16
lines changed

.github/workflows/build.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,10 @@ jobs:
1111
build-and-test:
1212
runs-on: ubuntu-latest
1313
steps:
14-
- uses: actions/checkout@v3
14+
- uses: actions/checkout@v4
1515

1616
- name: Set up Go
17-
uses: actions/setup-go@v4
17+
uses: actions/setup-go@v5
1818
with:
1919
go-version-file: 'go.mod'
2020

.github/workflows/golangci-lint.yml

+6-6
Original file line numberDiff line numberDiff line change
@@ -10,19 +10,19 @@ jobs:
1010
name: lint
1111
runs-on: ubuntu-latest
1212
steps:
13-
- uses: actions/checkout@v3
14-
- uses: actions/setup-go@v4
13+
- uses: actions/checkout@v4
14+
- uses: actions/setup-go@v5
1515
with:
1616
go-version-file: 'go.mod'
1717
- name: golangci-lint
18-
uses: golangci/golangci-lint-action@v3
18+
uses: golangci/golangci-lint-action@v6
1919
with:
2020
# Optional: version of golangci-lint to use in form of v1.2 or v1.2.3 or `latest` to use the latest version
21-
version: v1.58.0
21+
version: v1.62.0
2222
- name: golangci-lint warnings
23-
uses: golangci/golangci-lint-action@v3
23+
uses: golangci/golangci-lint-action@v6
2424
with:
2525
# Optional: version of golangci-lint to use in form of v1.2 or v1.2.3 or `latest` to use the latest version
26-
version: v1.58.0
26+
version: v1.62.0
2727
# Optional: golangci-lint command line arguments.
2828
args: -c .golangci-warnings.yml

abi/encode_test.go

+3-3
Original file line numberDiff line numberDiff line change
@@ -894,14 +894,14 @@ func addPrimitiveRandomValues(t *testing.T, pool *map[TypeKind][]testUnit) {
894894
ufixedIndex := 0
895895

896896
for bitSize := uintBegin; bitSize <= uintEnd; bitSize += uintStepLength {
897-
max := new(big.Int).Lsh(big.NewInt(1), uint(bitSize))
897+
lshBase := new(big.Int).Lsh(big.NewInt(1), uint(bitSize))
898898

899899
uintT, err := makeUintType(bitSize)
900900
require.NoError(t, err, "make uint type failure")
901901
uintTstr := uintT.String()
902902

903903
for j := 0; j < uintTestCaseCount; j++ {
904-
randVal, err := rand.Int(rand.Reader, max)
904+
randVal, err := rand.Int(rand.Reader, lshBase)
905905
require.NoError(t, err, "generate random uint, should be no error")
906906

907907
narrowest, err := castBigIntToNearestPrimitive(randVal, uint16(bitSize))
@@ -912,7 +912,7 @@ func addPrimitiveRandomValues(t *testing.T, pool *map[TypeKind][]testUnit) {
912912
}
913913

914914
for precision := 1; precision <= ufixedPrecision; precision++ {
915-
randVal, err := rand.Int(rand.Reader, max)
915+
randVal, err := rand.Int(rand.Reader, lshBase)
916916
require.NoError(t, err, "generate random ufixed, should be no error")
917917

918918
narrowest, err := castBigIntToNearestPrimitive(randVal, uint16(bitSize))

go.mod

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
module github.com/algorand/avm-abi
22

3-
go 1.21
3+
go 1.23
44

5-
toolchain go1.21.10
5+
toolchain go1.23.3
66

77
require (
88
github.com/chrismcguire/gobberish v0.0.0-20150821175641-1d8adb509a0e
9-
github.com/stretchr/testify v1.8.4
9+
github.com/stretchr/testify v1.9.0
1010
)
1111

1212
require (

go.sum

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c
44
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
55
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
66
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
7-
github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk=
8-
github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo=
7+
github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg=
8+
github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY=
99
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM=
1010
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
1111
gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=

0 commit comments

Comments
 (0)