diff --git a/internal/consumergroupoffsets/consumer-group-offset-operation.go b/internal/consumergroupoffsets/consumer-group-offset-operation.go index 749bfac..94bfff5 100644 --- a/internal/consumergroupoffsets/consumer-group-offset-operation.go +++ b/internal/consumergroupoffsets/consumer-group-offset-operation.go @@ -29,7 +29,7 @@ type ConsumerGroupOffsetOperation struct { func (operation *ConsumerGroupOffsetOperation) ResetConsumerGroupOffset(flags ResetConsumerGroupOffsetFlags, groupName string) error { - if (flags.Topic == nil || len(flags.Topic) == 0) && (!flags.AllTopics) { + if (len(flags.Topic) == 0) && (!flags.AllTopics) { return errors.New("no topic specified") } diff --git a/internal/producer/producer-operation.go b/internal/producer/producer-operation.go index ee0163a..a514c1d 100644 --- a/internal/producer/producer-operation.go +++ b/internal/producer/producer-operation.go @@ -213,7 +213,7 @@ func (operation *Operation) Produce(topic string, flags Flags) error { } if inputMessage, err = inputParser.ParseLine(line); err != nil { - return failWithMessageCount(messageCount, err.Error()) + return failWithMessageCount(messageCount, err.Error()) //nolint:govet } messageCount++