File: group_desc.go

package info (click to toggle)
prometheus-mongodb-exporter 1.0.0%2Bgit20180522.e755a44-1
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 668 kB
  • sloc: sh: 65; makefile: 27
file content (18 lines) | stat: -rw-r--r-- 458 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
package shared

import (
	"strings"
)

var (
	// EnabledGroups is map with the group name as field and a boolean indicating wether that group is enabled or not.
	EnabledGroups = make(map[string]bool)
)

// ParseEnabledGroups parses the groups passed by the command line input.
func ParseEnabledGroups(enabledGroupsFlag string) {
	for _, name := range strings.Split(enabledGroupsFlag, ",") {
		name = strings.TrimSpace(name)
		EnabledGroups[name] = true
	}
}