Skip to content

Commit

Permalink
Fix typo in diode.NewWriter argument name (#254)
Browse files Browse the repository at this point in the history
  • Loading branch information
mikluko committed Aug 6, 2020
1 parent 9e51190 commit 72acd6c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions diode/diode.go
Expand Up @@ -48,7 +48,7 @@ type Writer struct {
// used.
//
// See code.cloudfoundry.org/go-diodes for more info on diode.
func NewWriter(w io.Writer, size int, poolInterval time.Duration, f Alerter) Writer {
func NewWriter(w io.Writer, size int, pollInterval time.Duration, f Alerter) Writer {
ctx, cancel := context.WithCancel(context.Background())
dw := Writer{
w: w,
Expand All @@ -59,9 +59,9 @@ func NewWriter(w io.Writer, size int, poolInterval time.Duration, f Alerter) Wri
f = func(int) {}
}
d := diodes.NewManyToOne(size, diodes.AlertFunc(f))
if poolInterval > 0 {
if pollInterval > 0 {
dw.d = diodes.NewPoller(d,
diodes.WithPollingInterval(poolInterval),
diodes.WithPollingInterval(pollInterval),
diodes.WithPollingContext(ctx))
} else {
dw.d = diodes.NewWaiter(d,
Expand Down

0 comments on commit 72acd6c

Please sign in to comment.