主程序移动到子线程运行
This commit is contained in:
parent
dde1fa75a5
commit
a870dee77d
2
go.mod
2
go.mod
|
@ -12,7 +12,7 @@ require (
|
|||
github.com/gin-gonic/gin v1.8.1
|
||||
github.com/go-telegram-bot-api/telegram-bot-api/v5 v5.4.0-beta.0
|
||||
github.com/google/uuid v1.3.0
|
||||
github.com/huoxue1/xdaemon v0.0.0-20221003021252-8ce95c07edb0
|
||||
github.com/huoxue1/xdaemon v0.0.0-20221003093816-b336469d0ae8
|
||||
github.com/imroc/req/v3 v3.8.2
|
||||
github.com/johlanse/wechat v0.0.0-20220909140933-49a96a4c0412
|
||||
github.com/kardianos/osext v0.0.0-20190222173326-2bc1f35cddc0
|
||||
|
|
2
go.sum
2
go.sum
|
@ -161,6 +161,8 @@ github.com/hashicorp/hcl v1.0.0 h1:0Anlzjpi4vEasTeNFn2mLJgTSwt0+6sfsiTG8qcWGx4=
|
|||
github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ=
|
||||
github.com/huoxue1/xdaemon v0.0.0-20221003021252-8ce95c07edb0 h1:SePyM2Way5A1kaXfMfaES0uBrsiDEJqKGxmFCpbLcQc=
|
||||
github.com/huoxue1/xdaemon v0.0.0-20221003021252-8ce95c07edb0/go.mod h1:2o/jLOwlNdu8qpZc0nYDbPGhPgKkpkG8JdcQn7HY1gA=
|
||||
github.com/huoxue1/xdaemon v0.0.0-20221003093816-b336469d0ae8 h1:+Ox6yWz9/PsyRgiVPEhtthSv/0/3R4ytg6CjfEs5+OQ=
|
||||
github.com/huoxue1/xdaemon v0.0.0-20221003093816-b336469d0ae8/go.mod h1:2o/jLOwlNdu8qpZc0nYDbPGhPgKkpkG8JdcQn7HY1gA=
|
||||
github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc=
|
||||
github.com/ianlancetaylor/demangle v0.0.0-20200824232613-28f6c0f3b639/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc=
|
||||
github.com/imroc/req/v3 v3.8.2 h1:wFZ7B0dclCQyjClP5GwXRboUGIek5l0mCpodrGgT01c=
|
||||
|
|
|
@ -29,6 +29,12 @@ var (
|
|||
)
|
||||
|
||||
func TgInit() {
|
||||
defer func() {
|
||||
recover()
|
||||
tgPush = func(id string, kind string, message string) {
|
||||
|
||||
}
|
||||
}()
|
||||
config := conf.GetConfig()
|
||||
log.Infoln("已采用tg交互模式")
|
||||
telegram := Telegram{
|
||||
|
|
Loading…
Reference in New Issue