From 498247d0cb3c22b6fa7af4beee946000c6b2ff17 Mon Sep 17 00:00:00 2001 From: Roman Khimov Date: Sat, 6 Sep 2025 14:56:03 +0300 Subject: [PATCH 1/4] go.mod: upgrade minimal Go to 1.24, fix #55 Signed-off-by: Roman Khimov --- .github/workflows/run_tests.yml | 10 +++++----- go.mod | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/run_tests.yml b/.github/workflows/run_tests.yml index bd71faf..b58f51f 100644 --- a/.github/workflows/run_tests.yml +++ b/.github/workflows/run_tests.yml @@ -26,7 +26,7 @@ jobs: - name: Set up Go uses: actions/setup-go@v5 with: - go-version: '1.24' + go-version: '1.25' cache: true - name: Write coverage profile @@ -45,14 +45,14 @@ jobs: strategy: matrix: os: [ ubuntu-latest, windows-2022, macos-14 ] - go_versions: [ '1.23', '1.24' ] + go_versions: [ '1.24', '1.25' ] exclude: - os: macos-14 - go_versions: '1.23' + go_versions: '1.24' - os: windows-2022 - go_versions: '1.23' - - os: ubuntu-latest go_versions: '1.24' + - os: ubuntu-latest + go_versions: '1.25' fail-fast: false steps: - uses: actions/checkout@v4 diff --git a/go.mod b/go.mod index 94e8ef1..3a5efc5 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,6 @@ module github.com/nspcc-dev/tzhash -go 1.22 +go 1.24 require ( github.com/stretchr/testify v1.9.0 From 02b086c84663540f2156f5f0a2e406ceef97bb2e Mon Sep 17 00:00:00 2001 From: Roman Khimov Date: Sat, 6 Sep 2025 14:57:46 +0300 Subject: [PATCH 2/4] go.mod: upgrade github.com/stretchr/testify to v1.11.1 Signed-off-by: Roman Khimov --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index 3a5efc5..a705f1c 100644 --- a/go.mod +++ b/go.mod @@ -3,7 +3,7 @@ module github.com/nspcc-dev/tzhash go 1.24 require ( - github.com/stretchr/testify v1.9.0 + github.com/stretchr/testify v1.11.1 golang.org/x/sys v0.23.0 ) diff --git a/go.sum b/go.sum index e8aaee7..f4809a0 100644 --- a/go.sum +++ b/go.sum @@ -2,8 +2,8 @@ github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= -github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= -github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= +github.com/stretchr/testify v1.11.1 h1:7s2iGBzp5EwR7/aIZr8ao5+dra3wiQyKjjFuvgVKu7U= +github.com/stretchr/testify v1.11.1/go.mod h1:wZwfW3scLgRK+23gO65QZefKpKQRnfz6sD981Nm4B6U= golang.org/x/sys v0.23.0 h1:YfKFowiIMvtgl1UERQoTPPToxltDeZfbj4H7dVUCwmM= golang.org/x/sys v0.23.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM= From b88ec0a96a6d7c17a8b90bc3552b8ec0f9b3b880 Mon Sep 17 00:00:00 2001 From: Roman Khimov Date: Sat, 6 Sep 2025 14:58:27 +0300 Subject: [PATCH 3/4] go.mod: ugprade golang.org/x/sys to v0.35.0 Signed-off-by: Roman Khimov --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index a705f1c..dff1442 100644 --- a/go.mod +++ b/go.mod @@ -4,7 +4,7 @@ go 1.24 require ( github.com/stretchr/testify v1.11.1 - golang.org/x/sys v0.23.0 + golang.org/x/sys v0.35.0 ) require ( diff --git a/go.sum b/go.sum index f4809a0..8591270 100644 --- a/go.sum +++ b/go.sum @@ -4,8 +4,8 @@ github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZb github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/stretchr/testify v1.11.1 h1:7s2iGBzp5EwR7/aIZr8ao5+dra3wiQyKjjFuvgVKu7U= github.com/stretchr/testify v1.11.1/go.mod h1:wZwfW3scLgRK+23gO65QZefKpKQRnfz6sD981Nm4B6U= -golang.org/x/sys v0.23.0 h1:YfKFowiIMvtgl1UERQoTPPToxltDeZfbj4H7dVUCwmM= -golang.org/x/sys v0.23.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.35.0 h1:vz1N37gP5bs89s7He8XuIYXpyY0+QlsKmzipCbUtyxI= +golang.org/x/sys v0.35.0/go.mod h1:BJP2sWEmIv4KK5OTEluFJCKSidICx8ciO85XgH3Ak8k= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= From f9d196e0f71e2c0edf3485e0790452f63d0c0639 Mon Sep 17 00:00:00 2001 From: Roman Khimov Date: Sat, 6 Sep 2025 14:59:24 +0300 Subject: [PATCH 4/4] tz: use Go 1.24+ b.Loop() for tests Signed-off-by: Roman Khimov --- tz/hash_test.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/tz/hash_test.go b/tz/hash_test.go index d31d8c9..697f3ca 100644 --- a/tz/hash_test.go +++ b/tz/hash_test.go @@ -111,10 +111,9 @@ func BenchmarkSum(b *testing.B) { b.Run(backends[i].Name+" digest", func(b *testing.B) { prepareArch(b, backends[i].arch) - b.ResetTimer() b.ReportAllocs() d := New() - for range b.N { + for b.Loop() { d.Reset() _, _ = d.Write(data) d.Sum(nil)