fix ci
CI / Build binary CI (push) Has been cancelled Details

This commit is contained in:
huoxue1 2023-10-05 12:04:58 +08:00
parent 7046923857
commit de0b8e2f10
2 changed files with 12 additions and 7 deletions

15
main.go
View File

@ -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)

View File

@ -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))
})