mirror of
https://github.com/luxfi/container.git
synced 2026-09-24 00:24:34 +00:00
Go 1.27.1, and the code it can say more simply
Modules declare go 1.27.1 and the build images follow. go fix applied the modernizers: any, WaitGroup.Go, range over int, and a promoted-field key in a struct literal. omitzero is not applied, since it changes what the JSON says. Co-authored-by: Hanzo Dev <[email protected]>
This commit is contained in:
@@ -39,7 +39,7 @@ func TestBoundedQueue(t *testing.T) {
|
||||
require.Zero(b.Len())
|
||||
|
||||
// Fill the queue
|
||||
for i := 0; i < maxSize; i++ {
|
||||
for i := range maxSize {
|
||||
b.Push(i)
|
||||
require.Equal(i+1, b.Len())
|
||||
got, ok := b.Peek()
|
||||
@@ -55,7 +55,7 @@ func TestBoundedQueue(t *testing.T) {
|
||||
// Queue is [0, 1, 2]
|
||||
|
||||
// Empty the queue
|
||||
for i := 0; i < maxSize; i++ {
|
||||
for i := range maxSize {
|
||||
got, ok := b.Pop()
|
||||
require.True(ok)
|
||||
require.Equal(i, got)
|
||||
@@ -75,7 +75,7 @@ func TestBoundedQueue(t *testing.T) {
|
||||
require.Empty(b.List())
|
||||
|
||||
// Fill the queue again
|
||||
for i := 0; i < maxSize; i++ {
|
||||
for i := range maxSize {
|
||||
b.Push(i)
|
||||
require.Equal(i+1, b.Len())
|
||||
}
|
||||
@@ -120,7 +120,7 @@ func TestBoundedQueue(t *testing.T) {
|
||||
}
|
||||
|
||||
// Empty the queue
|
||||
for i := 0; i < maxSize; i++ {
|
||||
for i := range maxSize {
|
||||
got, ok := b.Pop()
|
||||
require.True(ok)
|
||||
require.Equal(i+3, got)
|
||||
|
||||
Reference in New Issue
Block a user