Explorar o código

create controller folder before generate code file

huangrf %!s(int64=6) %!d(string=hai) anos
pai
achega
a3a367f383
Modificáronse 1 ficheiros con 1 adicións e 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 {