From 4881e179cc1e0bd62f9ff606809c7828e5852860 Mon Sep 17 00:00:00 2001 From: Saxon Date: Thu, 14 Mar 2019 09:09:57 +1030 Subject: [PATCH] revid: multiSender active=>isActive --- revid/senders.go | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/revid/senders.go b/revid/senders.go index bba427da..47ab02f5 100644 --- a/revid/senders.go +++ b/revid/senders.go @@ -55,9 +55,9 @@ type Sender interface { // multiSender allows for the sending through multi loadSenders using a single // call to multiSender.Write. type multiSender struct { - active func() bool - senders []loadSender - retry bool + isActive func() bool + senders []loadSender + retry bool } // newMultiSender returns a pointer to a new multiSender. active is a function @@ -68,8 +68,8 @@ func newMultiSender(senders []loadSender, active func() bool) *multiSender { panic("multi sender requires that active func is provided") } s := &multiSender{ - senders: senders, - active: active, + senders: senders, + isActive: active, } return s } @@ -80,7 +80,7 @@ func newMultiSender(senders []loadSender, active func() bool) *multiSender { func (s *multiSender) Write(d []byte) (int, error) { for _, sender := range s.senders { sender.load(d) - for s.active() { + for s.isActive() { err := sender.send() if err != nil { sender.handleSendFail(err)