1、重新实现数据库初始化

2、新增超级管理员可以转让项目
3、新增超级管理员可以公开项目
This commit is contained in:
Minho
2017-05-11 13:39:34 +08:00
parent 45ef30c4d9
commit ca2e0478ca
15 changed files with 477 additions and 283 deletions

View File

@@ -1,16 +1,21 @@
package commands
import (
"os"
"net/http"
"github.com/astaxie/beego"
"encoding/json"
"io/ioutil"
"fmt"
"io/ioutil"
"net/http"
"os"
"github.com/astaxie/beego"
"github.com/lifei6671/godoc/conf"
)
func Update() {
if len(os.Args) > 2 && os.Args[1] == "update" {
//系统升级.
func Update() {
if len(os.Args) >= 2 && os.Args[1] == "update" {
fmt.Println("update successed.")
os.Exit(0)
}
@@ -45,8 +50,8 @@ func CheckUpdate() {
beego.Error("CheckUpdate => ", err)
os.Exit(1)
}
fmt.Println("MinDoc last version => ",result[0].Name)
fmt.Println("MinDoc current version => ", conf.VERSION)
fmt.Println("MinDoc last version => ", result[0].Name)
os.Exit(0)
}
}
}