Skip to content

Commit

Permalink
Merge pull request #90 from hellofresh/patch/update-golint-issues
Browse files Browse the repository at this point in the history
rename unused vars
  • Loading branch information
s-radyuk authored Jan 16, 2024
2 parents cb6b42b + f75b647 commit 7ef95e6
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 12 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
- name: Check out code
uses: actions/checkout@v3
- name: golangci-lint
uses: golangci/golangci-lint-action@v2
uses: golangci/golangci-lint-action@v3
with:
only-new-issues: ${{ github.event_name == 'pull_request' }}

Expand Down
6 changes: 3 additions & 3 deletions driver/inmemory/eventstore.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ func NewEventStore(logger goengine.Logger) *EventStore {
}

// Create creates an event stream
func (i *EventStore) Create(ctx context.Context, streamName goengine.StreamName) error {
func (i *EventStore) Create(_ context.Context, streamName goengine.StreamName) error {
if _, found := i.streams[streamName]; found {
return ErrStreamExistsAlready
}
Expand All @@ -49,15 +49,15 @@ func (i *EventStore) Create(ctx context.Context, streamName goengine.StreamName)
}

// HasStream returns true if the stream exists
func (i *EventStore) HasStream(ctx context.Context, streamName goengine.StreamName) bool {
func (i *EventStore) HasStream(_ context.Context, streamName goengine.StreamName) bool {
_, found := i.streams[streamName]

return found
}

// Load returns a list of events based on the provided conditions
func (i *EventStore) Load(
ctx context.Context,
_ context.Context,
streamName goengine.StreamName,
fromNumber int64,
count *uint,
Expand Down
2 changes: 1 addition & 1 deletion extension/amqp/amqp_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ func (ch mockChannel) Consume(
) (<-chan amqp.Delivery, error) {
return make(chan amqp.Delivery), nil
}
func (ch mockChannel) Qos(prefetchCount, prefetchSize int, global bool) error {
func (ch mockChannel) Qos(int, int, bool) error {
return nil
}

Expand Down
10 changes: 5 additions & 5 deletions logger_nop.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,18 +8,18 @@ var NopLogger Logger = &nopLogger{}
type nopLogger struct {
}

func (nopLogger) Error(msg string, fields func(LoggerEntry)) {
func (nopLogger) Error(string, func(LoggerEntry)) {
}

func (nopLogger) Warn(msg string, fields func(LoggerEntry)) {
func (nopLogger) Warn(string, func(LoggerEntry)) {
}

func (nopLogger) Info(msg string, fields func(LoggerEntry)) {
func (nopLogger) Info(string, func(LoggerEntry)) {
}

func (nopLogger) Debug(msg string, fields func(LoggerEntry)) {
func (nopLogger) Debug(string, func(LoggerEntry)) {
}

func (n *nopLogger) WithFields(fields func(LoggerEntry)) Logger {
func (n *nopLogger) WithFields(func(LoggerEntry)) Logger {
return n
}
2 changes: 1 addition & 1 deletion metadata/matcher.go
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ func WithConstraint(parent Matcher, field string, operator Operator, value inter
}
}

func (*emptyMatcher) Iterate(callback func(constraint Constraint)) {
func (*emptyMatcher) Iterate(func(constraint Constraint)) {
}

func (c *constraintMatcher) Iterate(callback func(constraint Constraint)) {
Expand Down
2 changes: 1 addition & 1 deletion metadata/metadata.go
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ var (
_ easyjson.Marshaler = new(emptyData)
)

func (*emptyData) Value(key string) interface{} {
func (*emptyData) Value(string) interface{} {
return nil
}

Expand Down

0 comments on commit 7ef95e6

Please sign in to comment.