diff options
author | baude <bbaude@redhat.com> | 2019-07-10 13:14:17 -0500 |
---|---|---|
committer | baude <bbaude@redhat.com> | 2019-07-11 09:13:06 -0500 |
commit | a78c885397ad2938b9b21438bcfa8a00dd1eb03f (patch) | |
tree | d02607bb19379942b5cac3aa50e1c7428d68e8b9 /libpod/events | |
parent | e2e8477f83f717d6a92badd317ae909cf185d04e (diff) | |
download | podman-a78c885397ad2938b9b21438bcfa8a00dd1eb03f.tar.gz podman-a78c885397ad2938b9b21438bcfa8a00dd1eb03f.tar.bz2 podman-a78c885397ad2938b9b21438bcfa8a00dd1eb03f.zip |
golangci-lint pass number 2
clean up and prepare to migrate to the golangci-linter
Signed-off-by: baude <bbaude@redhat.com>
Diffstat (limited to 'libpod/events')
-rw-r--r-- | libpod/events/filters.go | 5 | ||||
-rw-r--r-- | libpod/events/nullout.go | 3 |
2 files changed, 3 insertions, 5 deletions
diff --git a/libpod/events/filters.go b/libpod/events/filters.go index 9a64082d1..b3c5eda6e 100644 --- a/libpod/events/filters.go +++ b/libpod/events/filters.go @@ -1,7 +1,6 @@ package events import ( - "fmt" "strings" "time" @@ -23,7 +22,7 @@ func generateEventFilter(filter, filterValue string) (func(e *Event) bool, error }, nil case "EVENT", "STATUS": return func(e *Event) bool { - return fmt.Sprintf("%s", e.Status) == filterValue + return string(e.Status) == filterValue }, nil case "IMAGE": return func(e *Event) bool { @@ -54,7 +53,7 @@ func generateEventFilter(filter, filterValue string) (func(e *Event) bool, error }, nil case "TYPE": return func(e *Event) bool { - return fmt.Sprintf("%s", e.Type) == filterValue + return string(e.Type) == filterValue }, nil } return nil, errors.Errorf("%s is an invalid filter", filter) diff --git a/libpod/events/nullout.go b/libpod/events/nullout.go index 7d811a9c7..b11afcf80 100644 --- a/libpod/events/nullout.go +++ b/libpod/events/nullout.go @@ -17,7 +17,6 @@ func (e EventToNull) Read(options ReadOptions) error { // NewNullEventer returns a new null eventer. You should only do this for // the purposes on internal libpod testing. func NewNullEventer() Eventer { - var e Eventer - e = EventToNull{} + e := EventToNull{} return e } |