From 8a2cb2ae1c23f427e1ab7eaed4d8670eeaa4e9b4 Mon Sep 17 00:00:00 2001 From: ZhengYang Date: Fri, 22 Aug 2014 16:04:07 +0800 Subject: [PATCH 1/2] minor fix --- g_appcode.go | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/g_appcode.go b/g_appcode.go index fc5ce83..532b979 100644 --- a/g_appcode.go +++ b/g_appcode.go @@ -680,11 +680,7 @@ func (*PostgresDB) GetGoDataType(sqlType string) (goType string) { // deleteAndRecreatePaths removes several directories completely func createPaths(mode byte, paths *MvcPath) { if (mode & O_MODEL) == O_MODEL { - err := os.Mkdir(paths.ModelPath, 0777) - if err != nil { - ColorLog("[ERRO]", err) - os.Exit(2) - } + os.Mkdir(paths.ModelPath, 0777) } if (mode & O_CONTROLLER) == O_CONTROLLER { os.Mkdir(paths.ControllerPath, 0777) From 18e7fdb02db3f4f95ed4698f1ceb0c4e3714f1e2 Mon Sep 17 00:00:00 2001 From: ZhengYang Date: Fri, 22 Aug 2014 16:16:22 +0800 Subject: [PATCH 2/2] added example in api usage --- apiapp.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/apiapp.go b/apiapp.go index ecf61ef..f016045 100644 --- a/apiapp.go +++ b/apiapp.go @@ -32,6 +32,8 @@ bee api [appname] [-tables=""] [-driver=mysql] [-conn=root:@tcp(127.0.0.1:3306)/ -tables: a list of table names separated by ',', default is empty, indicating all tables -driver: [mysql | postgres | sqlite], the default is mysql -conn: the connection string used by the driver, the default is '' + e.g. for mysql: root:@tcp(127.0.0.1:3306)/test + e.g. for postgres: postgres://postgres:postgres@127.0.0.1:5432/postgres if conn is empty will create a example api application. otherwise generate api application based on an existing database.