func ParseYAML(data []byte) ([]*LogsConfig, error) {
	var configs []*LogsConfig
	var err error
	v := viper.New()
	v.SetConfigType(yaml)
	err = v.ReadConfig(bytes.NewBuffer(data))
	if err != nil {
		return nil, fmt.Errorf("could not decode YAML logs config: %v", err)
	}
	err = v.UnmarshalKey(logsPath, &configs)
	if err != nil {
		return nil, fmt.Errorf("could not parse YAML logs config: %v", err)
	}
	return configs, nil
}
// ParseYAML parses the data formatted in YAML,
// returns an error if the parsing failed.
ParseYAML parses the data formatted in YAML,
returns an error if the parsing failed.
// ParseYAML parses the data formatted in YAML // returns an error if the parsing failed .
func ParseYAML(data []byte) ([]*LogsConfig, error) {
	var configs []*LogsConfig
	var err error
	v := viper.New()
	v.SetConfigType(yaml)
	err = v.ReadConfig(bytes.NewBuffer(data))
	if err != nil {
		return nil, fmt.Errorf("could not decode YAML logs config: %v", err)
	}
	err = v.UnmarshalKey(logsPath, &configs)
	if err != nil {
		return nil, fmt.Errorf("could not parse YAML logs config: %v", err)
	}
	return configs, nil
}
func ParseYAML ( data [ ] byte ) ( [ ] * LogsConfig , error ) { var configs [ ] * LogsConfig var err error v := viper . New ( ) v . SetConfigType ( yaml ) err = v . ReadConfig ( bytes . NewBuffer ( data ) ) if err != nil { return nil , fmt . Errorf ( " " , err ) } err = v . UnmarshalKey ( logsPath , & configs ) if err != nil { return nil , fmt . Errorf ( " " , err ) } return configs , nil }
ParseYAML parses the data formatted in YAML,
returns an error if the parsing failed.
ParseYAML parses the data formatted in YAML returns an error if the parsing failed .