Skip to content

Commit

Permalink
fix: goleak
Browse files Browse the repository at this point in the history
  • Loading branch information
acha-bill committed Sep 25, 2024
1 parent 0fef5ec commit 034304b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion pkg/api/api.go
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ type Storer interface {
}

type PinIntegrity interface {
Check(ctx context.Context, logger log.Logger, pin string, out chan storer.PinStat, stat chan storer.CorruptedPinChunk)
Check(ctx context.Context, logger log.Logger, pin string, out chan storer.PinStat, corrupted chan storer.CorruptedPinChunk)
Repair(ctx context.Context, logger log.Logger, pin string, store storer.NetStore, res chan storer.RepairPinResult)
}

Expand Down
3 changes: 2 additions & 1 deletion pkg/api/pin_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -233,11 +233,12 @@ type mockPinIntegrity struct {
Store storage.Store
}

func (p *mockPinIntegrity) Check(ctx context.Context, logger log.Logger, pin string, out chan storer.PinStat, stat chan storer.CorruptedPinChunk) {
func (p *mockPinIntegrity) Check(ctx context.Context, logger log.Logger, pin string, out chan storer.PinStat, corrupted chan storer.CorruptedPinChunk) {
if pin != pinRef {
p.tester.Fatal("bad pin", pin)
}
close(out)
close(corrupted)
}

func (p *mockPinIntegrity) Repair(ctx context.Context, logger log.Logger, pin string, netStore storer.NetStore, res chan storer.RepairPinResult) {
Expand Down

0 comments on commit 034304b

Please sign in to comment.