Skip to content

Commit

Permalink
chore: minor style adjustments
Browse files Browse the repository at this point in the history
  • Loading branch information
YuukanOO committed Sep 16, 2024
1 parent 8438438 commit f049422
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 7 deletions.
9 changes: 3 additions & 6 deletions pkg/bus/spy/dispatcher.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,7 @@ type (
// Builds a new dispatcher used for testing only. It will not send anything but
// append the requests and signals to the internal slices so they can be checked.
func NewDispatcher() Dispatcher {
return &dispatcher{
requests: make([]bus.Request, 0),
signals: make([]bus.Signal, 0),
}
return &dispatcher{}
}

func (d *dispatcher) Send(ctx context.Context, msg bus.Request) (any, error) {
Expand All @@ -43,8 +40,8 @@ func (d *dispatcher) Notify(ctx context.Context, msgs ...bus.Signal) error {
}

func (d *dispatcher) Reset() {
d.requests = make([]bus.Request, 0)
d.signals = make([]bus.Signal, 0)
d.requests = nil
d.signals = nil
}

func (d *dispatcher) Requests() []bus.Request { return d.requests }
Expand Down
2 changes: 1 addition & 1 deletion pkg/storage/sqlite/builder/builder.go
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ func (q *queryBuilder[T]) All(

defer rows.Close()

results := make([]T, 0)
var results []T

// Instantiates needed stuff for data loaders
mappings := make([]keysMapping, len(loaders))
Expand Down

0 comments on commit f049422

Please sign in to comment.