label_sync/main.go
func LoadConfig(path string, orgs string) (*Configuration, error) {
	if path == "" {
		return nil, errors.New("empty path")
	}
	var c Configuration
	data, err := ioutil.ReadFile(path)
	if err != nil {
		return nil, err
	}
	if err = yaml.Unmarshal(data, &c); err != nil {
		return nil, err
	}
	if err = c.validate(orgs); err != nil { // Ensure no dups
		return nil, err
	}
	return &c, nil
}
func LoadConfig(path string, orgs string) (*Configuration, error) {
	if path == "" {
		return nil, errors.New("empty path")
	}
	var c Configuration
	data, err := ioutil.ReadFile(path)
	if err != nil {
		return nil, err
	}
	if err = yaml.Unmarshal(data, &c); err != nil {
		return nil, err
	}
	if err = c.validate(orgs); err != nil { // Ensure no dups
		return nil, err
	}
	return &c, nil
}
func LoadConfig ( path string , orgs string ) ( * Configuration , error ) { if path == " " { return nil , errors . New ( " " ) } var c Configuration data , err := ioutil . ReadFile ( path ) if err != nil { return nil , err } if err = yaml . Unmarshal ( data , & c ) ; err != nil { return nil , err } if err = c . validate ( orgs ) ; err != nil { // Ensure no dups return nil , err } return & c , nil }
// LoadConfig reads the yaml config at path
LoadConfig reads the yaml config at path