diff --git a/src/internal/stringslite/strings.go b/src/internal/stringslite/strings.go index 4114b86130..3a09e08cf4 100644 --- a/src/internal/stringslite/strings.go +++ b/src/internal/stringslite/strings.go @@ -14,7 +14,7 @@ import ( ) func HasPrefix(s, prefix string) bool { - return len(s) >= len(prefix) && s[0:len(prefix)] == prefix + return len(s) >= len(prefix) && s[:len(prefix)] == prefix } func HasSuffix(s, suffix string) bool {