From a161ff475559ea564722c45a99989c3ba314dc25 Mon Sep 17 00:00:00 2001 From: ZhengYang Date: Fri, 1 Aug 2014 18:38:32 +0800 Subject: [PATCH] rename function name for clarity --- g_models.go | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/g_models.go b/g_models.go index 13e5a6c..0c6db10 100644 --- a/g_models.go +++ b/g_models.go @@ -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) } }