go-graphite / carbonapi

Found usage of default slice index SCC-S1010
Anti-pattern
Major
4 months ago2 years old
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					}