1
0
mirror of https://github.com/mgechev/revive.git synced 2025-11-27 22:18:41 +02:00

chore: format code with gofumpt (#1583)

This commit is contained in:
Oleksandr Redko
2025-11-17 13:35:59 +02:00
committed by GitHub
parent db0fc8688f
commit dbcecde212
13 changed files with 132 additions and 59 deletions

View File

@@ -13,19 +13,25 @@ func TestStringFormat(t *testing.T) {
[]any{
"stringFormatMethod1", // The first argument is checked by default
"/^[A-Z]/",
"must start with a capital letter"},
"must start with a capital letter",
},
[]any{
"stringFormatMethod2[2].d",
"/[^\\.]$/"}, // Must not end with a period
"/[^\\.]$/",
}, // Must not end with a period
[]any{
"s.Method3[2]",
"!/^[Tt][Hh]/",
"must not start with 'th'"},
"must not start with 'th'",
},
[]any{
"s.Method4", // same as before, but called from a struct
"!/^[Ot][Tt]/",
"must not start with 'ot'"}}})
"must not start with 'ot'",
},
},
})
}
func TestStringFormatDuplicatedStrings(t *testing.T) {