From d5349f9769910321670687f455efd10b691f2fc7 Mon Sep 17 00:00:00 2001 From: Minho Date: Thu, 25 May 2017 15:49:41 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=9B=B4=E6=96=B0=E7=A8=8B?= =?UTF-8?q?=E5=BA=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- commands/update.go | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/commands/update.go b/commands/update.go index 02006a29..c32fc8bd 100644 --- a/commands/update.go +++ b/commands/update.go @@ -23,6 +23,14 @@ func Update() { }else if adapter == "sqlite3" { sqliteUpdate() } + o := orm.NewOrm() + + b,err := ioutil.ReadFile("./data/data.sql") + + if err != nil { + panic(err.Error()) + os.Exit(1) + } fmt.Println("update successed.") os.Exit(0) @@ -98,6 +106,4 @@ func sqliteUpdate() { os.Exit(1) } } - - os.Exit(1) } \ No newline at end of file