chore: lint 💄

This commit is contained in:
Samuel Berthe
2025-04-26 17:33:43 +02:00
parent 964a3c7ac3
commit d91b19f1eb

View File

@@ -1,13 +1,14 @@
package lo package lo
import ( import (
"github.com/samber/lo/internal/rand"
"math" "math"
"regexp" "regexp"
"strings" "strings"
"unicode" "unicode"
"unicode/utf8" "unicode/utf8"
"github.com/samber/lo/internal/rand"
"golang.org/x/text/cases" "golang.org/x/text/cases"
"golang.org/x/text/language" "golang.org/x/text/language"
) )
@@ -108,7 +109,7 @@ func Substring[T ~string](str T, offset int, length uint) T {
length = uint(size - offset) length = uint(size - offset)
} }
return T(strings.Replace(string(rs[offset:offset+int(length)]), "\x00", "", -1)) return T(strings.ReplaceAll(string(rs[offset:offset+int(length)]), "\x00", ""))
} }
// ChunkString returns an array of strings split into groups the length of size. If array can't be split evenly, // ChunkString returns an array of strings split into groups the length of size. If array can't be split evenly,