// parseTasks creates the struct representation of the tasks section in the yaml file.
parseTasks creates the struct representation of the tasks section in the yaml file.
// parseTasks creates the struct representation of the tasks section in the yaml file .
func parseTasks(tasksYaml []interface{}, variables map[string]string) (tasks []model.Task, err error) {
	for _, taskYaml := range tasksYaml {
		var task model.Task
		taskYaml := taskYaml.(map[string](interface{}))
		if name, ok := taskYaml["Name"].(string); ok {
			task.Name = name
		}
		task.Steps, err = parseSteps(taskYaml["Steps"].([]interface{}), variables)
		if err != nil {
			return tasks, err
		}
		tasks = append(tasks, task)
	}
	return tasks, nil
}
func parseTasks ( tasksYaml [ ] interface { } , variables map [ string ] string ) ( tasks [ ] model . Task , err error ) { for _ , taskYaml := range tasksYaml { var task model . Task taskYaml := taskYaml . ( map [ string ] ( interface { } ) ) if name , ok := taskYaml [ " " ] . ( string ) ; ok { task . Name = name } task . Steps , err = parseSteps ( taskYaml [ " " ] . ( [ ] interface { } ) , variables ) if err != nil { return tasks , err } tasks = append ( tasks , task ) } return tasks , nil }
parseTasks creates the struct representation of the tasks section in the yaml file.
parseTasks creates the struct representation of the tasks section in the yaml file .
//Iterate tasks