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 (
|
import (
|
||||||
"flag"
|
"flag"
|
||||||
"fmt"
|
"fmt"
|
||||||
"github.com/sjkhsl/study_xxqg/utils/stop"
|
|
||||||
"io"
|
"io"
|
||||||
"math/rand"
|
"math/rand"
|
||||||
"net/http"
|
"net/http"
|
||||||
|
@ -17,6 +16,8 @@ import (
|
||||||
"syscall"
|
"syscall"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
|
"github.com/sjkhsl/study_xxqg/utils/stop"
|
||||||
|
|
||||||
"github.com/gin-gonic/gin"
|
"github.com/gin-gonic/gin"
|
||||||
rotates "github.com/lestrrat-go/file-rotatelogs"
|
rotates "github.com/lestrrat-go/file-rotatelogs"
|
||||||
"github.com/robfig/cron/v3"
|
"github.com/robfig/cron/v3"
|
||||||
|
@ -46,6 +47,12 @@ var (
|
||||||
var VERSION = "unknown"
|
var VERSION = "unknown"
|
||||||
|
|
||||||
func init() {
|
func init() {
|
||||||
|
if i {
|
||||||
|
core := &lib.Core{}
|
||||||
|
core.Init()
|
||||||
|
core.Quit()
|
||||||
|
os.Exit(0)
|
||||||
|
}
|
||||||
if runtime.GOOS != "windows" {
|
if runtime.GOOS != "windows" {
|
||||||
runBack()
|
runBack()
|
||||||
}
|
}
|
||||||
|
@ -133,12 +140,6 @@ func init() {
|
||||||
func main() {
|
func main() {
|
||||||
conf.SetVersion(VERSION)
|
conf.SetVersion(VERSION)
|
||||||
log.Infoln("当前程序运行版本: " + VERSION)
|
log.Infoln("当前程序运行版本: " + VERSION)
|
||||||
if i {
|
|
||||||
core := &lib.Core{}
|
|
||||||
core.Init()
|
|
||||||
core.Quit()
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
go update.CheckUpdate(VERSION)
|
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) {
|
pushs = append(pushs, func(id, kind, message string) {
|
||||||
log.Debugln(fmt.Sprintf("消息id: %v,消息类型:%v,消息内容:%v", id, kind, message))
|
log.Debugln(fmt.Sprintf("消息id: %v,消息类型:%v,消息内容:%v", id, kind, message))
|
||||||
})
|
})
|
||||||
|
|
Loading…
Reference in New Issue