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 Jun 29, 2018
1 parent 28382aa commit bde87bb
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 bde87bb

Please sign in to comment.