fix ci
CI / Build binary CI (push) Has been cancelled
Details
CI / Build binary CI (push) Has been cancelled
Details
This commit is contained in:
parent
7046923857
commit
de0b8e2f10
15
main.go
15
main.go
|
@ -3,7 +3,6 @@ package main
|
|||
import (
|
||||
"flag"
|
||||
"fmt"
|
||||
"github.com/sjkhsl/study_xxqg/utils/stop"
|
||||
"io"
|
||||
"math/rand"
|
||||
"net/http"
|
||||
|
@ -17,6 +16,8 @@ import (
|
|||
"syscall"
|
||||
"time"
|
||||
|
||||
"github.com/sjkhsl/study_xxqg/utils/stop"
|
||||
|
||||
"github.com/gin-gonic/gin"
|
||||
rotates "github.com/lestrrat-go/file-rotatelogs"
|
||||
"github.com/robfig/cron/v3"
|
||||
|
@ -46,6 +47,12 @@ var (
|
|||
var VERSION = "unknown"
|
||||
|
||||
func init() {
|
||||
if i {
|
||||
core := &lib.Core{}
|
||||
core.Init()
|
||||
core.Quit()
|
||||
os.Exit(0)
|
||||
}
|
||||
if runtime.GOOS != "windows" {
|
||||
runBack()
|
||||
}
|
||||
|
@ -133,12 +140,6 @@ func init() {
|
|||
func main() {
|
||||
conf.SetVersion(VERSION)
|
||||
log.Infoln("当前程序运行版本: " + VERSION)
|
||||
if i {
|
||||
core := &lib.Core{}
|
||||
core.Init()
|
||||
core.Quit()
|
||||
return
|
||||
}
|
||||
|
||||
go update.CheckUpdate(VERSION)
|
||||
|
||||
|
|
|
@ -63,6 +63,10 @@ func GetPush(config conf.Config) func(id string, kind string, message string) {
|
|||
|
||||
})
|
||||
}
|
||||
if config.FeiShu.Enable {
|
||||
log.Infoln("已配置飞书推送")
|
||||
pushs = append(pushs, (&Feishu{HookUrl: config.FeiShu.HookUrl, Secret: config.FeiShu.Secret}).GetPush())
|
||||
}
|
||||
pushs = append(pushs, func(id, kind, message string) {
|
||||
log.Debugln(fmt.Sprintf("消息id: %v,消息类型:%v,消息内容:%v", id, kind, message))
|
||||
})
|
||||
|
|
Loading…
Reference in New Issue