style: fix format

This commit is contained in:
Hoshina
2026-02-14 17:23:18 +08:00
parent 7fa641a2ed
commit 1fcf3fde0f

View File

@@ -18,19 +18,18 @@ import (
type OneBotChannel struct { type OneBotChannel struct {
*BaseChannel *BaseChannel
config config.OneBotConfig config config.OneBotConfig
conn *websocket.Conn conn *websocket.Conn
ctx context.Context ctx context.Context
cancel context.CancelFunc cancel context.CancelFunc
dedup map[string]struct{} dedup map[string]struct{}
dedupRing []string dedupRing []string
dedupIdx int dedupIdx int
mu sync.Mutex mu sync.Mutex
writeMu sync.Mutex writeMu sync.Mutex
echoCounter int64 echoCounter int64
} }
type oneBotRawEvent struct { type oneBotRawEvent struct {
PostType string `json:"post_type"` PostType string `json:"post_type"`
MessageType string `json:"message_type"` MessageType string `json:"message_type"`
@@ -44,9 +43,9 @@ type oneBotRawEvent struct {
SelfID json.RawMessage `json:"self_id"` SelfID json.RawMessage `json:"self_id"`
Time json.RawMessage `json:"time"` Time json.RawMessage `json:"time"`
MetaEventType string `json:"meta_event_type"` MetaEventType string `json:"meta_event_type"`
Echo string `json:"echo"` Echo string `json:"echo"`
RetCode json.RawMessage `json:"retcode"` RetCode json.RawMessage `json:"retcode"`
Status string `json:"status"` Status string `json:"status"`
} }
type oneBotSender struct { type oneBotSender struct {
@@ -56,19 +55,19 @@ type oneBotSender struct {
} }
type oneBotEvent struct { type oneBotEvent struct {
PostType string PostType string
MessageType string MessageType string
SubType string SubType string
MessageID string MessageID string
UserID int64 UserID int64
GroupID int64 GroupID int64
Content string Content string
RawContent string RawContent string
IsBotMentioned bool IsBotMentioned bool
Sender oneBotSender Sender oneBotSender
SelfID int64 SelfID int64
Time int64 Time int64
MetaEventType string MetaEventType string
} }
type oneBotAPIRequest struct { type oneBotAPIRequest struct {
@@ -264,7 +263,7 @@ func (c *OneBotChannel) buildSendRequest(msg bus.OutboundMessage) (string, inter
return "", nil, fmt.Errorf("invalid user ID in chatID: %s", chatID) return "", nil, fmt.Errorf("invalid user ID in chatID: %s", chatID)
} }
return "send_private_msg", oneBotSendPrivateMsgParams{ return "send_private_msg", oneBotSendPrivateMsgParams{
UserID: userID, UserID: userID,
Message: msg.Content, Message: msg.Content,
}, nil }, nil
} }