MCPcopy Index your code
hub / github.com/netdata/netdata / normalizeUnique

Function normalizeUnique

src/go/plugin/framework/chartengine/compiler.go:479–489  ·  view source on GitHub ↗
(values []string)

Source from the content-addressed store, hash-verified

477}
478
479func normalizeUnique(values []string) []string {
480 set := make(map[string]struct{}, len(values))
481 for _, value := range values {
482 value = strings.TrimSpace(value)
483 if value == "" {
484 continue
485 }
486 set[value] = struct{}{}
487 }
488 return mapKeysSorted(set)
489}
490
491func mapKeysSorted(set map[string]struct{}) []string {
492 out := make([]string, 0, len(set))

Callers 2

compileChartMethod · 0.85
compileDimensionFunction · 0.85

Calls 1

mapKeysSortedFunction · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…