refactor(cmd/joj3)!: conf #51
|  | @ -160,22 +160,24 @@ func parseConfFile(path string) (conf Conf, err error) { | ||||||
| 		return | 		return | ||||||
| 	} | 	} | ||||||
| 	// TODO: remove the following backward compatibility codes
 | 	// TODO: remove the following backward compatibility codes
 | ||||||
| 	conf.Stage.SandboxExecServer = conf.SandboxExecServer | 	if len(conf.Stage.Stages) == 0 { | ||||||
| 	conf.Stage.SandboxToken = conf.SandboxToken | 		conf.Stage.SandboxExecServer = conf.SandboxExecServer | ||||||
| 	conf.Stage.OutputPath = conf.OutputPath | 		conf.Stage.SandboxToken = conf.SandboxToken | ||||||
| 	conf.Stage.Stages = make([]ConfStage, len(conf.Stages)) | 		conf.Stage.OutputPath = conf.OutputPath | ||||||
| 	for i, stage := range conf.Stages { | 		conf.Stage.Stages = make([]ConfStage, len(conf.Stages)) | ||||||
| 		conf.Stage.Stages[i].Name = stage.Name | 		for i, stage := range conf.Stages { | ||||||
| 		conf.Stage.Stages[i].Group = stage.Group | 			conf.Stage.Stages[i].Name = stage.Name | ||||||
| 		conf.Stage.Stages[i].Executor = stage.Executor | 			conf.Stage.Stages[i].Group = stage.Group | ||||||
| 		conf.Stage.Stages[i].Parsers = []struct { | 			conf.Stage.Stages[i].Executor = stage.Executor | ||||||
| 			Name string | 			conf.Stage.Stages[i].Parsers = []struct { | ||||||
| 			With interface{} | 				Name string | ||||||
| 		}{ | 				With interface{} | ||||||
| 			{ | 			}{ | ||||||
| 				Name: stage.Parser.Name, | 				{ | ||||||
| 				With: stage.Parser.With, | 					Name: stage.Parser.Name, | ||||||
| 			}, | 					With: stage.Parser.With, | ||||||
|  | 				}, | ||||||
|  | 			} | ||||||
| 		} | 		} | ||||||
| 	} | 	} | ||||||
| 	return | 	return | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue
	
	Block a user