version指令优先显示本地版本

This commit is contained in:
gsw945 2021-06-29 13:56:41 +08:00
parent b6cb8933b7
commit 3baa00b5bb

View File

@ -14,7 +14,9 @@ import (
//检查最新版本.
func CheckUpdate() {
resp, err := http.Get("https://api.github.com/repos/lifei6671/mindoc/tags")
fmt.Println("MinDoc current version => ", conf.VERSION)
resp, err := http.Get("https://api.github.com/repos/mindoc-org/mindoc/tags")
if err != nil {
logs.Error("CheckUpdate => ", err)
@ -33,7 +35,6 @@ func CheckUpdate() {
}
err = json.Unmarshal(body, &result)
fmt.Println("MinDoc current version => ", conf.VERSION)
if err != nil {
logs.Error("CheckUpdate => ", err)
os.Exit(0)