should omit second index in slice, s[a:len(s)] is identical to s[a:]
93 if s[n:i] == "seriesByTag" {
94 end := strings.IndexRune(s[n:], ')')
95 if end == -1 {
96 return s[n:len(s)] // broken end of args, can't exist in correctly parsed functions 97 } else {
98 return s[n : n+end+1]
99 }
Description
When the second index to a slice is omitted, it defaults to the length of the slice.
Bad practice
s[1:len(s)]
Recommended
s[1:]
Thus, the index of the last element can be ignored.