//Parse parses a config file
Parse parses a config file
// Parse parses a config file
func (c *Config) Parse(path string) error {
	configFile, err := ioutil.ReadFile(path)
	if err != nil {
		return err
	}
	err = yaml.Unmarshal(configFile, c)
	if err != nil {
		return err
	}
	for _, v := range c.Dotfiles {
		if _, err := os.Stat(v.Filepath); os.IsNotExist(err) {
			return fmt.Errorf("unable to stat %s", v.Filepath)
		}
	}
	return nil
}
func ( c * Config ) Parse ( path string ) error { configFile , err := ioutil . ReadFile ( path ) if err != nil { return err } err = yaml . Unmarshal ( configFile , c ) if err != nil { return err } for _ , v := range c . Dotfiles { if _ , err := os . Stat ( v . Filepath ) ; os . IsNotExist ( err ) { return fmt . Errorf ( " " , v . Filepath ) } } return nil }
Parse parses a config file
Parse parses a config file