chore: enable early-return and superfluous-else from revive (#7129)

Signed-off-by: Matthieu MOREL <matthieu.morel35@gmail.com>
This commit is contained in:
Matthieu MOREL
2025-06-05 09:10:58 +02:00
committed by GitHub
parent ddb74cdcf4
commit 186e4a1dbb
8 changed files with 115 additions and 52 deletions

View File

@@ -149,12 +149,11 @@ func split255(s string) []string {
sx := []string{}
p, i := 0, 255
for {
if i <= len(s) {
sx = append(sx, s[p:i])
} else {
if i > len(s) {
sx = append(sx, s[p:])
break
}
sx = append(sx, s[p:i])
p, i = p+255, i+255
}