FILE / ScuroNeko/mtg

antireplay/noop.go

Исходный файл и его история в репозитории.
FILE bdabb0e59a90b15e1f9440e974b3a83d57eccd51
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{}
}