in config.go [127:150]
func GetSteps(config map[string]interface{}) ([]Step, error) {
parse := struct {
Steps []map[string]interface{} `mapstructure:"steps"`
}{}
if err := mapstructure.Decode(config, &parse); err != nil {
return nil, err
}
steps := make([]Step, 0, len(parse.Steps))
for _, sconf := range parse.Steps {
_, stype, err := GetNameType(sconf)
if err != nil {
return nil, err
}
step, err := GetStep(stype, sconf)
if err != nil {
return nil, err
}
steps = append(steps, step)
}
return steps, nil
}