Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -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
2 changes: 1 addition & 1 deletion go.work
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
go 1.25.8
go 1.25.0

use (
.
Expand Down
2 changes: 1 addition & 1 deletion json/benchmarks/go.mod
Original file line number Diff line number Diff line change
@@ -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
Expand Down
5 changes: 1 addition & 4 deletions json/go.mod
Original file line number Diff line number Diff line change
@@ -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
12 changes: 0 additions & 12 deletions json/go.sum
Original file line number Diff line number Diff line change
@@ -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=
Expand All @@ -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=
2 changes: 1 addition & 1 deletion json/internal/utf8x/_asm/go.mod
Original file line number Diff line number Diff line change
@@ -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

Expand Down
2 changes: 1 addition & 1 deletion json/lexers/default-lexer/internal/strscan/_asm/go.mod
Original file line number Diff line number Diff line change
@@ -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

Expand Down
2 changes: 1 addition & 1 deletion json/lexers/yaml-lexer/go.mod
Original file line number Diff line number Diff line change
@@ -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
Expand Down
17 changes: 12 additions & 5 deletions json/stores/default-store/concurrent_store_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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 {
Expand Down
12 changes: 1 addition & 11 deletions json/stores/default-store/concurrent_stress_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
)
Expand Down Expand Up @@ -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))
Expand All @@ -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)
Expand Down
Loading