Skip to content

Commit

Permalink
Go 1 23 + linter (#131)
Browse files Browse the repository at this point in the history
* Bump fortio.org/fortio from 1.67.1 to 1.68.0

Bumps [fortio.org/fortio](https://github.com/fortio/fortio) from 1.67.1 to 1.68.0.
- [Release notes](https://github.com/fortio/fortio/releases)
- [Commits](fortio/fortio@v1.67.1...v1.68.0)

---
updated-dependencies:
- dependency-name: fortio.org/fortio
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

* go 1.23 and lints

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
  • Loading branch information
ldemailly and dependabot[bot] authored Nov 13, 2024
1 parent c980ffb commit 9aaed87
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 23 deletions.
20 changes: 10 additions & 10 deletions cb/cb_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ func testBoundaryConditions(t *testing.T, buffer cb.Queue[int]) {
}

// Test filling the buffer
for i := 0; i < capacity; i++ {
for i := range capacity {
if !buffer.Push(i) {
t.Errorf("Failed to push item %d to the buffer", i)
}
Expand All @@ -73,7 +73,7 @@ func testBoundaryConditions(t *testing.T, buffer cb.Queue[int]) {
}

// Test popping items from the full buffer
for i := 0; i < capacity; i++ {
for i := range capacity {
item, ok := buffer.Pop()
if !ok || item != i {
t.Errorf("Popped item should be %d, got %d", i, item)
Expand All @@ -86,14 +86,14 @@ func testBoundaryConditions(t *testing.T, buffer cb.Queue[int]) {

go func() {
defer wg.Done()
for i := 0; i < 100; i++ {
for i := range 100 {
buffer.PushBlocking(i)
}
}()

go func() {
defer wg.Done()
for i := 0; i < 100; i++ {
for i := range 100 {
item := buffer.PopBlocking()
if item != i {
t.Errorf("Popped item should be %d, got %d", i, item)
Expand Down Expand Up @@ -154,7 +154,7 @@ func testProducerConsumerScenario(t *testing.T, buffer cb.Queue[int]) {

producer := func(id int) {
defer wg.Done()
for i := 0; i < 2; i++ {
for i := range 2 {
buffer.PushBlocking(id*10 + i)
}
}
Expand All @@ -170,7 +170,7 @@ func testProducerConsumerScenario(t *testing.T, buffer cb.Queue[int]) {
}

// Start 10 producer goroutines
for i := 0; i < 10; i++ {
for i := range 10 {
go producer(i)
}

Expand Down Expand Up @@ -219,27 +219,27 @@ func benchmarkPushBlocking(b *testing.B, buffer cb.Queue[int], numProducers, num
consN := b.N * numProducers
producer := func() {
defer wg.Done()
for i := 0; i < prodN; i++ {
for i := range prodN {
buffer.PushBlocking(i)
}
}

consumer := func() {
defer wg.Done()
for i := 0; i < consN; i++ {
for range consN {
buffer.PopBlocking()
}
}

b.ResetTimer()

// Start producer goroutines
for i := 0; i < numProducers; i++ {
for range numProducers {
go producer()
}

// Start consumer goroutines
for i := 0; i < numConsumers; i++ {
for range numConsumers {
go consumer()
}

Expand Down
10 changes: 5 additions & 5 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
module fortio.org/memstore

go 1.21
go 1.23.3

require (
fortio.org/dflag v1.7.3
fortio.org/fortio v1.67.1
fortio.org/fortio v1.68.0
fortio.org/log v1.17.1
fortio.org/scli v1.15.3
fortio.org/sets v1.2.0
Expand All @@ -20,9 +20,9 @@ require (
github.com/kortschak/goroutine v1.1.2 // indirect
golang.org/x/crypto/x509roots/fallback v0.0.0-20240904212608-c9da6b9a4008 // indirect
golang.org/x/exp v0.0.0-20240904232852-e7e105dedf7e // indirect
golang.org/x/net v0.29.0 // indirect
golang.org/x/sys v0.25.0 // indirect
golang.org/x/text v0.18.0 // indirect
golang.org/x/net v0.31.0 // indirect
golang.org/x/sys v0.27.0 // indirect
golang.org/x/text v0.20.0 // indirect
)

// replace fortio.org/scli => ../scli
16 changes: 8 additions & 8 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ fortio.org/cli v1.9.2 h1:17eJ8QZPjXHcLBpeCe0QMO/0fj5Bw0ZTxVgL7V9jOqc=
fortio.org/cli v1.9.2/go.mod h1:7r55OoTV8NXcTvJT4boWk8s3I2LP6TMZh/0LLMJEYw0=
fortio.org/dflag v1.7.3 h1:yws+v+/fJ67bYgrgcWpLtgdZPEWkYuwdfqz/WyQ8UXo=
fortio.org/dflag v1.7.3/go.mod h1:O1Pk4lKRolw9wwAGyjTo8IsNyqqNRQGKxPOfpOElMqM=
fortio.org/fortio v1.67.1 h1:KAYyeu6z/01d/QwJm2dCVIadAhd8jNsezJHhlkoOMwU=
fortio.org/fortio v1.67.1/go.mod h1:XfrXH/BJ/hhxBXHj9z8FaqvsBbnf46SLyoWtPgopDlU=
fortio.org/fortio v1.68.0 h1:2M9RuitiN+MgW6QlTJCHjW6PJLAPj/YCXegxSCLQ3rw=
fortio.org/fortio v1.68.0/go.mod h1:1IjDaEoT5crHBN7BRLBwrHE24pIT6rOPKrYG3jEIWaA=
fortio.org/log v1.17.1 h1:YQoGyZBnXTVIs77/nZw7BppwSOIamP3I092PGBenBZs=
fortio.org/log v1.17.1/go.mod h1:t58Spg9njjymvRioh5F6qKGSupEsnMjXLGWIS1i3khE=
fortio.org/safecast v1.0.0 h1:dr3131WPX8iS1pTf76+39WeXbTrerDYLvi9s7Oi3wiY=
Expand All @@ -28,9 +28,9 @@ golang.org/x/crypto/x509roots/fallback v0.0.0-20240904212608-c9da6b9a4008 h1:vKH
golang.org/x/crypto/x509roots/fallback v0.0.0-20240904212608-c9da6b9a4008/go.mod h1:kNa9WdvYnzFwC79zRpLRMJbdEFlhyM5RPFBBZp/wWH8=
golang.org/x/exp v0.0.0-20240904232852-e7e105dedf7e h1:I88y4caeGeuDQxgdoFPUq097j7kNfw6uvuiNxUBfcBk=
golang.org/x/exp v0.0.0-20240904232852-e7e105dedf7e/go.mod h1:akd2r19cwCdwSwWeIdzYQGa/EZZyqcOdwWiwj5L5eKQ=
golang.org/x/net v0.29.0 h1:5ORfpBpCs4HzDYoodCDBbwHzdR5UrLBZ3sOnUJmFoHo=
golang.org/x/net v0.29.0/go.mod h1:gLkgy8jTGERgjzMic6DS9+SP0ajcu6Xu3Orq/SpETg0=
golang.org/x/sys v0.25.0 h1:r+8e+loiHxRqhXVl6ML1nO3l1+oFoWbnlu2Ehimmi34=
golang.org/x/sys v0.25.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
golang.org/x/text v0.18.0 h1:XvMDiNzPAl0jr17s6W9lcaIhGUfUORdGCNsuLmPG224=
golang.org/x/text v0.18.0/go.mod h1:BuEKDfySbSR4drPmRPG/7iBdf8hvFMuRexcpahXilzY=
golang.org/x/net v0.31.0 h1:68CPQngjLL0r2AlUKiSxtQFKvzRVbnzLwMUn5SzcLHo=
golang.org/x/net v0.31.0/go.mod h1:P4fl1q7dY2hnZFxEk4pPSkDHF+QqjitcnDjUQyMM+pM=
golang.org/x/sys v0.27.0 h1:wBqf8DvsY9Y/2P8gAfPDEYNuS30J4lPHJxXSb/nJZ+s=
golang.org/x/sys v0.27.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
golang.org/x/text v0.20.0 h1:gK/Kv2otX8gz+wn7Rmb3vT96ZwuoxnQlY+HlJVj7Qug=
golang.org/x/text v0.20.0/go.mod h1:D4IsuqiFMhST5bX19pQ9ikHC2GsaKyk/oF+pn3ducp4=

0 comments on commit 9aaed87

Please sign in to comment.