Skip to content

Commit 4ae8653

Browse files
Remove condition that will never be true
In alphanumerically sorted list of strings, abcdef will never come before abc. Signed-off-by: Edwin Mackenzie-Owen <[email protected]>
1 parent b3247d4 commit 4ae8653

File tree

1 file changed

+0
-6
lines changed

1 file changed

+0
-6
lines changed

stackdriver_exporter.go

-6
Original file line numberDiff line numberDiff line change
@@ -382,12 +382,6 @@ func parseMetricTypePrefixes() (metricTypePrefixes []string) {
382382
continue
383383
}
384384

385-
// previous prefix starts with current prefix
386-
if strings.HasPrefix(metricTypePrefixes[previousIndex], prefix) {
387-
// drop previous prefix
388-
metricTypePrefixes = metricTypePrefixes[:previousIndex]
389-
}
390-
391385
metricTypePrefixes = append(metricTypePrefixes, prefix)
392386
}
393387
}

0 commit comments

Comments
 (0)