Fix typo in diode.NewWriter argument name (#254)

This commit is contained in:
Mikhail Lukianchenko 2020-08-06 13:19:27 +03:00 committed by GitHub
parent 9e51190d47
commit 72acd6cfe8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 3 deletions

View File

@ -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,
@ -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,