// UnmarshalYaml is used to unmarshal the given yaml file to go struct.
UnmarshalYaml is used to unmarshal the given yaml file to go struct.
// UnmarshalYaml is used to unmarshal the given yaml file to go struct .
func UnmarshalYaml(filePath string) (TemplateConfig, error) {
	var c TemplateConfig
	if _, err := os.Stat(filePath); os.IsNotExist(err) {
		return c, err
	}
	data, err := ioutil.ReadFile(filePath)
	if err != nil {
		return c, err
	}
	err = yaml.UnmarshalStrict(data, &c)
	if err != nil {
		return c, err
	}
	return c, nil
}
func UnmarshalYaml ( filePath string ) ( TemplateConfig , error ) { var c TemplateConfig if _ , err := os . Stat ( filePath ) ; os . IsNotExist ( err ) { return c , err } data , err := ioutil . ReadFile ( filePath ) if err != nil { return c , err } err = yaml . UnmarshalStrict ( data , & c ) if err != nil { return c , err } return c , nil }
UnmarshalYaml is used to unmarshal the given yaml file to go struct.
UnmarshalYaml is used to unmarshal the given yaml file to go struct .