func (parser *Parser) initStage(stageMap map[interface{}]interface{}) (stages.Stage, error) { var stageType = "command" if stageMap["type"] != nil { stageType = stageMap["type"].(string) } else if stageMap["stage_type"] != nil { log.Warn("found property \"stage_type\"") log.Warn("property \"stage_type\" is deprecated. please use \"type\" instead.") stageType = stageMap["stage_type"].(string) } return stages.InitStage(stageType) }
func createStage(stageType string) stages.Stage { stage, _ := stages.InitStage(stageType) return stage }