mirror of
https://github.com/mindoc-org/mindoc.git
synced 2025-04-05 20:17:53 +08:00
version指令优先显示本地版本
This commit is contained in:
parent
b6cb8933b7
commit
3baa00b5bb
@ -14,7 +14,9 @@ import (
|
|||||||
//检查最新版本.
|
//检查最新版本.
|
||||||
func CheckUpdate() {
|
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 {
|
if err != nil {
|
||||||
logs.Error("CheckUpdate => ", err)
|
logs.Error("CheckUpdate => ", err)
|
||||||
@ -33,7 +35,6 @@ func CheckUpdate() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
err = json.Unmarshal(body, &result)
|
err = json.Unmarshal(body, &result)
|
||||||
fmt.Println("MinDoc current version => ", conf.VERSION)
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
logs.Error("CheckUpdate => ", err)
|
logs.Error("CheckUpdate => ", err)
|
||||||
os.Exit(0)
|
os.Exit(0)
|
||||||
|
Loading…
Reference in New Issue
Block a user