platform: Add group interface

This commit is contained in:
世界 2023-07-02 16:45:30 +08:00
parent 5ad0ea2b5a
commit 9c8565cf21
No known key found for this signature in database
GPG key ID: CD109927C34A63C4
25 changed files with 576 additions and 95 deletions

View file

@ -11,7 +11,7 @@ func (s *CommandServer) WriteMessage(message string) {
s.subscriber.Emit(message)
s.access.Lock()
s.savedLines.PushBack(message)
if s.savedLines.Len() > 100 {
if s.savedLines.Len() > s.maxLines {
s.savedLines.Remove(s.savedLines.Front())
}
s.access.Unlock()