Explorar el Código

create controller folder before generate code file

huangrf hace 6 años
padre
commit
a3a367f383
Se han modificado 1 ficheros con 1 adiciones y 0 borrados
  1. 1 0
      client/engineclient.go

+ 1 - 0
client/engineclient.go

@@ -137,6 +137,7 @@ func (c *EngineClient) GenerateToPath(xmlfile string,dest_path string)  {
 					ioutil.WriteFile(path, result.Data[i].Content, os.ModePerm)
 				}
 			} else if ft == "controllers" {
+				os.MkdirAll(filepath.Dir(path), os.ModePerm)
 				if strings.Index(path, "_gen.go") > 0 {
 					ioutil.WriteFile(path, result.Data[i].Content, os.ModePerm)
 				} else {