Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rename unused vars #90

Merged
merged 5 commits into from
Jan 16, 2024
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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, _ 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)) {
s-radyuk marked this conversation as resolved.
Show resolved Hide resolved
}

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
Loading