1
0
mirror of https://github.com/fumiama/go-onebot-agent.git synced 2026-06-11 21:50:25 +08:00

chore: make lint happy

This commit is contained in:
源文雨
2026-01-03 16:36:31 +08:00
parent 1373905df8
commit 4717f71311
2 changed files with 1 additions and 16 deletions

View File

@@ -12,6 +12,7 @@ var (
errMemoryHasReturn = errors.New("memory has \\r|\\n")
)
// MemoryStorage can be a db or just some files
type MemoryStorage interface {
Save(grp int64, text string) error
Load(grp int64) []string

View File

@@ -64,19 +64,3 @@ type Terminus struct{}
func (Terminus) String() string {
return `{"action":"` + EOA + `"}`
}
type Memory struct {
Action string `json:"action"`
GroupID int64 `json:"group_id,omitempty"` // QQ群号
UserID int64 `json:"user_id,omitempty"` // QQ号
Text string `json:"text"`
}
func (m *Memory) String() string {
sb := strings.Builder{}
err := json.NewEncoder(&sb).Encode(m)
if err != nil {
panic(errors.Wrap(err, "unexpected"))
}
return strings.TrimSpace(sb.String())
}