From 4a3b32f3c561fcccb08cad23f67b8c926879c502 Mon Sep 17 00:00:00 2001 From: Frederic BIDON Date: Fri, 31 Jul 2026 13:13:59 +0200 Subject: [PATCH] chore: remove dependency that caused required go version to bump to go1.25.8 Signed-off-by: Frederic BIDON --- go.mod | 2 +- go.work | 2 +- json/benchmarks/go.mod | 2 +- json/go.mod | 5 +---- json/go.sum | 12 ------------ json/internal/utf8x/_asm/go.mod | 2 +- .../default-lexer/internal/strscan/_asm/go.mod | 2 +- json/lexers/yaml-lexer/go.mod | 2 +- .../default-store/concurrent_store_test.go | 17 ++++++++++++----- .../default-store/concurrent_stress_test.go | 12 +----------- 10 files changed, 20 insertions(+), 38 deletions(-) diff --git a/go.mod b/go.mod index b3b87d9..dbd3505 100644 --- a/go.mod +++ b/go.mod @@ -1,5 +1,5 @@ module github.com/go-openapi/core -go 1.25.8 +go 1.25.0 replace github.com/go-openapi/json => ./json diff --git a/go.work b/go.work index 4f2825e..59e5166 100644 --- a/go.work +++ b/go.work @@ -1,4 +1,4 @@ -go 1.25.8 +go 1.25.0 use ( . diff --git a/json/benchmarks/go.mod b/json/benchmarks/go.mod index bdab8b1..bff5026 100644 --- a/json/benchmarks/go.mod +++ b/json/benchmarks/go.mod @@ -1,7 +1,7 @@ module github.com/go-openapi/core/json/benchmarks // go-json-experiment is forked and adapted by fredbi to support go1.25 -go 1.25.8 +go 1.25.0 require ( github.com/go-json-experiment/json v0.0.0-20260623181947-01eb4420fa68 diff --git a/json/go.mod b/json/go.mod index 4705172..5558e94 100644 --- a/json/go.mod +++ b/json/go.mod @@ -1,12 +1,9 @@ module github.com/go-openapi/core/json -go 1.25.8 +go 1.25.0 require ( github.com/go-openapi/swag/conv v0.28.0 github.com/go-openapi/swag/pools v0.28.0 github.com/go-openapi/testify/v2 v2.6.0 - go.step.sm/crypto v0.85.0 ) - -require github.com/pkg/errors v0.9.1 // indirect diff --git a/json/go.sum b/json/go.sum index 1d9f687..f34891f 100644 --- a/json/go.sum +++ b/json/go.sum @@ -1,5 +1,3 @@ -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/go-openapi/swag/conv v0.28.0 h1:GtqqbyFe7vR5Y7ehxG9W6/OvrSFdf1OLeTGp40TqxH8= github.com/go-openapi/swag/conv v0.28.0/go.mod h1:mbUE+mzctnhxi864m0Q07SpN8OowD9JhxmxuYvZZD/k= github.com/go-openapi/swag/pools v0.28.0 h1:HPMZWSAfce3rdVTFcjFiCIBtDg9h4x2QlRrHipwhxeU= @@ -8,13 +6,3 @@ github.com/go-openapi/swag/typeutils v0.28.0 h1:nRBKSBXjDgf01VDPB3fWeD9nQuhCOVeI github.com/go-openapi/swag/typeutils v0.28.0/go.mod h1:Srm0xFNRZ1Y+vCxJclo5qzx8aj+1pAKda/YfFPrG0dQ= github.com/go-openapi/testify/v2 v2.6.0 h1:5PKH2HE7YJ/LuRPQGvSxBRlFXNQhSetBLlGAgUEu3ug= github.com/go-openapi/testify/v2 v2.6.0/go.mod h1:SgsVHtfooshd0tublTtJ50FPKhujf47YRqauXXOUxfw= -github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= -github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= -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.11.1 h1:7s2iGBzp5EwR7/aIZr8ao5+dra3wiQyKjjFuvgVKu7U= -github.com/stretchr/testify v1.11.1/go.mod h1:wZwfW3scLgRK+23gO65QZefKpKQRnfz6sD981Nm4B6U= -go.step.sm/crypto v0.85.0 h1:h3U9gzCcxP1fWbseqy+CwsTxzHFNuoblefy7YP4jBHk= -go.step.sm/crypto v0.85.0/go.mod h1:Rp/BdP0/ZJ7eYREhXcE4izCABLp0e8ziFqb0LBNG7Cc= -gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= -gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= diff --git a/json/internal/utf8x/_asm/go.mod b/json/internal/utf8x/_asm/go.mod index 345f343..de4653f 100644 --- a/json/internal/utf8x/_asm/go.mod +++ b/json/internal/utf8x/_asm/go.mod @@ -1,6 +1,6 @@ module github.com/go-openapi/core/json/internal/utf8x/_asm -go 1.25.8 +go 1.25.0 require github.com/mmcloughlin/avo v0.6.1-0.20260701065415-16419356370f diff --git a/json/lexers/default-lexer/internal/strscan/_asm/go.mod b/json/lexers/default-lexer/internal/strscan/_asm/go.mod index fd8e800..efe65ae 100644 --- a/json/lexers/default-lexer/internal/strscan/_asm/go.mod +++ b/json/lexers/default-lexer/internal/strscan/_asm/go.mod @@ -1,6 +1,6 @@ module github.com/go-openapi/core/json/lexers/default-lexer/internal/strscan/_asm -go 1.25.8 +go 1.25.0 require github.com/mmcloughlin/avo v0.6.1-0.20260701065415-16419356370f diff --git a/json/lexers/yaml-lexer/go.mod b/json/lexers/yaml-lexer/go.mod index 7dd7e40..530b3c0 100644 --- a/json/lexers/yaml-lexer/go.mod +++ b/json/lexers/yaml-lexer/go.mod @@ -1,6 +1,6 @@ module github.com/go-openapi/core/json/lexers/yaml-lexer -go 1.25.8 +go 1.25.0 require ( github.com/go-openapi/core/json v0.0.2 diff --git a/json/stores/default-store/concurrent_store_test.go b/json/stores/default-store/concurrent_store_test.go index 479d2da..eb0a6c5 100644 --- a/json/stores/default-store/concurrent_store_test.go +++ b/json/stores/default-store/concurrent_store_test.go @@ -8,7 +8,6 @@ import ( "testing" "github.com/go-openapi/testify/v2/assert" - "go.step.sm/crypto/randutil" "github.com/go-openapi/core/json/stores" "github.com/go-openapi/core/json/stores/values" @@ -135,12 +134,20 @@ func randomStringValue(minSize, maxSize int) values.Value { func randomString(minSize, maxSize int) string { size := rand.IntN(maxSize-minSize) + minSize - s, err := randutil.Alphanumeric(size) - if err != nil { - panic(err) + return randomAlphanumeric(size) +} + +// alphanumericAlphabet is the alphabet drawn from by [randomAlphanumeric]. +const alphanumericAlphabet = "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ" + +// randomAlphanumeric builds a random alphanumeric string of the requested size. +func randomAlphanumeric(size int) string { + b := make([]byte, size) + for i := range b { + b[i] = alphanumericAlphabet[rand.IntN(len(alphanumericAlphabet))] } - return s + return string(b) } func randomNumberValues(n int, magnitude float64) []values.Value { diff --git a/json/stores/default-store/concurrent_stress_test.go b/json/stores/default-store/concurrent_stress_test.go index 7f4e794..0668361 100644 --- a/json/stores/default-store/concurrent_stress_test.go +++ b/json/stores/default-store/concurrent_stress_test.go @@ -7,8 +7,6 @@ import ( "sync/atomic" "testing" - "go.step.sm/crypto/randutil" - "github.com/go-openapi/core/json/stores" "github.com/go-openapi/core/json/stores/values" ) @@ -142,7 +140,7 @@ func stressSamples(n int) []stressSample { v = values.MakeStringValue(stressRepeat(rand.IntN(200) + 130)) case 2: // medium string, stored verbatim in the arena (9..128) - v = values.MakeStringValue(stressRandom(rand.IntN(100) + 20)) + v = values.MakeStringValue(randomAlphanumeric(rand.IntN(100) + 20)) default: // small / inlined values v = values.MakeUintegerValue(rand.Uint64N(1 << 40)) @@ -159,14 +157,6 @@ func stressString(v values.Value) string { return string(v.Bytes()) } -func stressRandom(size int) string { - s, err := randutil.Alphanumeric(size) - if err != nil { - panic(err) - } - return s -} - func stressRepeat(size int) string { const seed = "the quick brown fox jumps over the lazy dog " b := make([]byte, 0, size)