diff --git a/cmd/telegraf/printer.go b/cmd/telegraf/printer.go index 38d452465..ef9be7edf 100644 --- a/cmd/telegraf/printer.go +++ b/cmd/telegraf/printer.go @@ -136,7 +136,6 @@ func printSampleConfig( pnames = append(pnames, pname) } } - sort.Strings(pnames) printFilteredOutputs(pnames, true, outputBuffer) } } @@ -154,7 +153,6 @@ func printSampleConfig( for pname := range processors.Processors { pnames = append(pnames, pname) } - sort.Strings(pnames) printFilteredProcessors(pnames, true, outputBuffer) } } @@ -172,7 +170,6 @@ func printSampleConfig( for pname := range aggregators.Aggregators { pnames = append(pnames, pname) } - sort.Strings(pnames) printFilteredAggregators(pnames, true, outputBuffer) } } @@ -194,32 +191,11 @@ func printSampleConfig( pnames = append(pnames, pname) } } - sort.Strings(pnames) printFilteredInputs(pnames, true, outputBuffer) } } } -// PluginNameCounts returns a list of sorted plugin names and their count -func PluginNameCounts(plugins []string) []string { - names := make(map[string]int) - for _, plugin := range plugins { - names[plugin]++ - } - - var namecount []string - for name, count := range names { - if count == 1 { - namecount = append(namecount, name) - } else { - namecount = append(namecount, fmt.Sprintf("%s (%dx)", name, count)) - } - } - - sort.Strings(namecount) - return namecount -} - func printFilteredProcessors(processorFilters []string, commented bool, outputBuffer io.Writer) { // Filter processors var pnames []string