mirror of
https://github.com/lkmio/lkm.git
synced 2025-10-05 23:26:51 +08:00
使用gop缓存
This commit is contained in:
@@ -89,9 +89,9 @@ func (s *streamBuffer) Peek(index int) interface{} {
|
||||
head, tail := s.buffer.All()
|
||||
|
||||
if index < len(head) {
|
||||
return head[index]
|
||||
return head[index].(element).pkt
|
||||
} else {
|
||||
return tail[index-len(head)]
|
||||
return tail[index-len(head)].(element).pkt
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user