FILE / ScuroNeko/mtg

antireplay/noop.go

Исходный файл и его история в репозитории.
FILE d98d5be3a7d8e0c39c3e6d4dea1ba1ad008f286b
Files
mtg/antireplay/noop.go
T
2022-08-04 18:39:00 +03:00

14 lines
352 B
Go

package antireplay
import "github.com/9seconds/mtg/v2/mtglib"
type noop struct{}
func (n noop) SeenBefore(_ []byte) bool { return false }
// NewNoop returns an implementation that does nothing. A corresponding method
// always returns false, so this cache accepts everything you pass to it.
func NewNoop() mtglib.AntiReplayCache {
return noop{}
}