Upstream gookit/goutil state of the touched files before 71dcf88743
This commit is contained in:
1 parent
fd69f1aadd
commit
1ffc0f390b
3 files changed
-85
No files matched your search
@@ -166,12 +166,6 @@ func Substr(s string, pos, length int) string {
|
||||
stopIdx = strLn + length
|
||||
}
|
||||
|
||||
// A negative length can move stopIdx before pos; clamp to avoid an
|
||||
// out-of-range slice.
|
||||
if stopIdx < pos {
|
||||
stopIdx = pos
|
||||
}
|
||||
|
||||
return string(runes[pos:stopIdx])
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user