Files
podman/libpod/events/nullout.go
baude a78c885397 golangci-lint pass number 2
clean up and prepare to migrate to the golangci-linter

Signed-off-by: baude <bbaude@redhat.com>
2019-07-11 09:13:06 -05:00

23 lines
574 B
Go

package events
// EventToNull is an eventer type that only performs write operations
// and only writes to /dev/null. It is meant for unittests only
type EventToNull struct{}
// Write eats the event and always returns nil
func (e EventToNull) Write(ee Event) error {
return nil
}
// Read does nothing. Do not use it.
func (e EventToNull) Read(options ReadOptions) error {
return nil
}
// NewNullEventer returns a new null eventer. You should only do this for
// the purposes on internal libpod testing.
func NewNullEventer() Eventer {
e := EventToNull{}
return e
}