all: Run modernize -fix ./...

This commit is contained in:
Bjørn Erik Pedersen
2025-02-26 10:15:04 +01:00
parent b7ae24b9c2
commit 521911a576
141 changed files with 302 additions and 354 deletions

View File

@@ -191,16 +191,16 @@ func TestPanicInCreate(t *testing.T) {
return err
}
for i := 0; i < 3; i++ {
for j := 0; j < 3; j++ {
for i := range 3 {
for range 3 {
c.Assert(willPanic(i), qt.PanicMatches, fmt.Sprintf("panic-%d", i))
c.Assert(willErr(i), qt.ErrorMatches, fmt.Sprintf("error-%d", i))
}
}
// Test the same keys again without the panic.
for i := 0; i < 3; i++ {
for j := 0; j < 3; j++ {
for i := range 3 {
for range 3 {
v, err := p1.GetOrCreate(fmt.Sprintf("panic-%d", i), func(key string) (testItem, error) {
return testItem{
name: key,