mirror of
				https://github.com/beego/bee.git
				synced 2025-10-30 10:43:22 +00:00 
			
		
		
		
	rename function name for clarity
This commit is contained in:
		| @@ -223,7 +223,7 @@ func gen(dbms string, connStr string, mode byte, currpath string) { | ||||
| 	mvcPath.ModelPath = path.Join(currpath, "models") | ||||
| 	mvcPath.ControllerPath = path.Join(currpath, "controllers") | ||||
| 	mvcPath.RouterPath = path.Join(currpath, "routers") | ||||
| 	deleteAndRecreatePaths(mode, mvcPath) | ||||
| 	createPaths(mode, mvcPath) | ||||
| 	writeSourceFiles(tables, mode, mvcPath) | ||||
| } | ||||
|  | ||||
| @@ -403,17 +403,14 @@ func getColumns(db *sql.DB, table *Table, blackList map[string]bool) { | ||||
| } | ||||
|  | ||||
| // deleteAndRecreatePaths removes several directories completely | ||||
| func deleteAndRecreatePaths(mode byte, paths *MvcPath) { | ||||
| func createPaths(mode byte, paths *MvcPath) { | ||||
| 	if (mode & O_MODEL) == O_MODEL { | ||||
| 		//os.RemoveAll(paths.ModelPath) | ||||
| 		os.Mkdir(paths.ModelPath, 0777) | ||||
| 	} | ||||
| 	if (mode & O_CONTROLLER) == O_CONTROLLER { | ||||
| 		//os.RemoveAll(paths.ControllerPath) | ||||
| 		os.Mkdir(paths.ControllerPath, 0777) | ||||
| 	} | ||||
| 	if (mode & O_ROUTER) == O_ROUTER { | ||||
| 		//os.RemoveAll(paths.RouterPath) | ||||
| 		os.Mkdir(paths.RouterPath, 0777) | ||||
| 	} | ||||
| } | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 ZhengYang
					ZhengYang