// UnmarshalYAML handles custom unmarshalling of YAML
UnmarshalYAML handles custom unmarshalling of YAML
// UnmarshalYAML handles custom unmarshalling of YAML
func (p *Steps) UnmarshalYAML(unmarshal func(interface{}) error) error {
	slice := yaml.MapSlice{}
	if err := unmarshal(&slice); err != nil {
		return err
	}
	p.Steps = make([]*Step, 0)
	for _, s := range slice {
		step := Step{}
		out, _ := yaml.Marshal(s.Value)
		if err := yaml.Unmarshal(out, &step); err != nil {
			return err
		}
		if step.Name == "" {
			step.Name = fmt.Sprintf("%v", s.Key)
		}
		p.Steps = append(p.Steps, &step)
	}
	return nil
}
func ( p * Steps ) UnmarshalYAML ( unmarshal func ( interface { } ) error ) error { slice := yaml . MapSlice { } if err := unmarshal ( & slice ) ; err != nil { return err } p . Steps = make ( [ ] * Step , 0 ) for _ , s := range slice { step := Step { } out , _ := yaml . Marshal ( s . Value ) if err := yaml . Unmarshal ( out , & step ) ; err != nil { return err } if step . Name == " " { step . Name = fmt . Sprintf ( " " , s . Key ) } p . Steps = append ( p . Steps , & step ) } return nil }
UnmarshalYAML handles custom unmarshalling of YAML
UnmarshalYAML handles custom unmarshalling of YAML