Skip to content

Commit

Permalink
packet: improve NewAccumulator documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
kortschak committed Aug 1, 2018
1 parent a392535 commit 94115b6
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions packet/accumulator.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,9 @@ type accumulator struct {
packets []*Packet
}

// NewAccumulator creates a new packet accumulator
// that is done when the provided doneFunc returns true.
// PacketAccumulator is not thread safe
func NewAccumulator(f func([]byte) (bool, error)) Accumulator {
// NewAccumulator creates a new packet accumulator that is done when
// the provided function returns done as true.
func NewAccumulator(f func(data []byte) (done bool, err error)) Accumulator {
return &accumulator{f: f}
}

Expand Down

0 comments on commit 94115b6

Please sign in to comment.