mirror of
https://github.com/Mrs4s/go-cqhttp.git
synced 2025-05-04 19:17:37 +08:00
.github: update golint.yml
This commit is contained in:
parent
d33f17e727
commit
b70db344a6
1
.github/workflows/golint.yml
vendored
1
.github/workflows/golint.yml
vendored
@ -37,4 +37,5 @@ jobs:
|
||||
if: ${{ github.event.pull_request }}
|
||||
uses: reviewdog/action-suggester@v1
|
||||
with:
|
||||
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||
tool_name: golangci-lint
|
||||
|
@ -414,7 +414,7 @@ func ToMessageContent(e []message.IMessageElement) (r []global.MSG) {
|
||||
case *message.RedBagElement:
|
||||
m = global.MSG{
|
||||
"type": "redbag",
|
||||
"data": global.MSG{"title": o.Title, "type": o.MsgType},
|
||||
"data": global.MSG{"title": o.Title, "type": int(o.MsgType)},
|
||||
}
|
||||
case *message.ForwardElement:
|
||||
m = global.MSG{
|
||||
|
@ -5,7 +5,6 @@ import (
|
||||
"encoding/gob"
|
||||
"path"
|
||||
|
||||
"github.com/Mrs4s/MiraiGo/message"
|
||||
"github.com/Mrs4s/MiraiGo/utils"
|
||||
|
||||
"github.com/Mrs4s/MiraiGo/binary"
|
||||
@ -37,7 +36,6 @@ func init() {
|
||||
gob.Register(db.StoredGroupMessage{})
|
||||
gob.Register(db.StoredPrivateMessage{})
|
||||
gob.Register(db.StoredGuildChannelMessage{})
|
||||
gob.Register(message.RedBagMessageType(0))
|
||||
|
||||
db.Register("leveldb", func(node yaml.Node) db.Database {
|
||||
conf := new(config.LevelDBConfig)
|
||||
|
@ -2,7 +2,6 @@ package server
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
"context"
|
||||
"crypto/hmac"
|
||||
"crypto/sha1"
|
||||
"encoding/hex"
|
||||
@ -360,14 +359,3 @@ func (c *HTTPClient) onBotPushEvent(e *coolq.Event) {
|
||||
c.bot.CQHandleQuickOperation(gjson.Parse(e.JSONString()), gjson.ParseBytes(r))
|
||||
}
|
||||
}
|
||||
|
||||
func (s *httpServer) ShutDown() {
|
||||
ctx, cancel := context.WithTimeout(context.Background(), 5*time.Second)
|
||||
defer cancel()
|
||||
if err := s.HTTP.Shutdown(ctx); err != nil {
|
||||
log.Fatal("http Server Shutdown:", err)
|
||||
}
|
||||
<-ctx.Done()
|
||||
log.Println("timeout of 5 seconds.")
|
||||
log.Println("http Server exiting")
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user