1
0
mirror of https://github.com/fumiama/go-onebot-agent.git synced 2026-06-10 04:50:29 +08:00

chore: make lint happy

This commit is contained in:
源文雨
2025-09-26 00:00:05 +08:00
parent 46ace7c2b1
commit 4a13d48870
2 changed files with 3 additions and 1 deletions

View File

@@ -39,6 +39,7 @@ func (ev *Event) String() string {
return strings.TrimSpace(sb.String())
}
// APIResponse is the simplified OneBot response
type APIResponse struct {
Status string `json:"status"`
Data json.RawMessage `json:"data"`
@@ -47,6 +48,7 @@ type APIResponse struct {
RetCode int64 `json:"retcode"`
}
// String dumps JSON without tailing \n
func (resp *APIResponse) String() string {
sb := strings.Builder{}
err := json.NewEncoder(&sb).Encode(resp)