func loadGrafanaConfigs() (map[string]string, error) {
	data := make(map[string]string)

	pattern := filepath.Join(getGrafanaConfigPath(), "*.yaml")
	configs, err := filepath.Glob(pattern)
	if err != nil {
		return nil, err
	}

	for _, f := range configs {
		config, err := ioutil.ReadFile(f)
		if err != nil {
			return nil, err
		}

		parts := strings.Split(f, "/")
		filename := parts[len(parts)-1]
		data[filename] = string(config)
	}

	return data, nil
}
// loadGrafanaConfigs will scan the config directory and read any files ending with '.yaml'
loadGrafanaConfigs will scan the config directory and read any files ending with '.yaml'
// loadGrafanaConfigs will scan the config directory and read any files ending with ' . yaml '
func loadGrafanaConfigs() (map[string]string, error) {
	data := make(map[string]string)
	pattern := filepath.Join(getGrafanaConfigPath(), "*.yaml")
	configs, err := filepath.Glob(pattern)
	if err != nil {
		return nil, err
	}
	for _, f := range configs {
		config, err := ioutil.ReadFile(f)
		if err != nil {
			return nil, err
		}
		parts := strings.Split(f, "/")
		filename := parts[len(parts)-1]
		data[filename] = string(config)
	}
	return data, nil
}
func loadGrafanaConfigs ( ) ( map [ string ] string , error ) { data := make ( map [ string ] string ) pattern := filepath . Join ( getGrafanaConfigPath ( ) , " " ) configs , err := filepath . Glob ( pattern ) if err != nil { return nil , err } for _ , f := range configs { config , err := ioutil . ReadFile ( f ) if err != nil { return nil , err } parts := strings . Split ( f , " " ) filename := parts [ len ( parts ) - 1 ] data [ filename ] = string ( config ) } return data , nil }
loadGrafanaConfigs will scan the config directory and read any files ending with '.yaml'
loadGrafanaConfigs will scan the config directory and read any files ending with ' . yaml '