mirror of
https://github.com/mindoc-org/mindoc.git
synced 2025-09-19 18:22:10 +08:00
chore!(all): attempt to update beego to v2
BREAKING CHANGE: beego has update to v2, and this version of mindoc IS NOT TESTED AND STABLE!!!
This commit is contained in:
@@ -7,7 +7,7 @@ import (
|
||||
"net/http"
|
||||
"os"
|
||||
|
||||
"github.com/astaxie/beego"
|
||||
"github.com/astaxie/beego/logs"
|
||||
"github.com/mindoc-org/mindoc/conf"
|
||||
)
|
||||
|
||||
@@ -17,14 +17,14 @@ func CheckUpdate() {
|
||||
resp, err := http.Get("https://api.github.com/repos/lifei6671/mindoc/tags")
|
||||
|
||||
if err != nil {
|
||||
beego.Error("CheckUpdate => ", err)
|
||||
logs.Error("CheckUpdate => ", err)
|
||||
os.Exit(1)
|
||||
}
|
||||
|
||||
defer resp.Body.Close()
|
||||
body, err := ioutil.ReadAll(resp.Body)
|
||||
if err != nil {
|
||||
beego.Error("CheckUpdate => ", err)
|
||||
logs.Error("CheckUpdate => ", err)
|
||||
os.Exit(1)
|
||||
}
|
||||
|
||||
@@ -35,7 +35,7 @@ func CheckUpdate() {
|
||||
err = json.Unmarshal(body, &result)
|
||||
fmt.Println("MinDoc current version => ", conf.VERSION)
|
||||
if err != nil {
|
||||
beego.Error("CheckUpdate => ", err)
|
||||
logs.Error("CheckUpdate => ", err)
|
||||
os.Exit(0)
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user