diff --git a/labels.go b/labels.go index f9faacfe..979fccbc 100644 --- a/labels.go +++ b/labels.go @@ -122,9 +122,10 @@ func Split(s string) []int { } // NextLabel returns the index of the start of the next label in the -// string s starting at offset. +// string s starting at offset. A negative offset will cause a panic. // The bool end is true when the end of the string has been reached. // Also see PrevLabel. + func NextLabel(s string, offset int) (i int, end bool) { if s == "" { return 0, true