Skip to content

Commit 47f8f85

Browse files
authored
Merge pull request #17 from reugn/develop
document function panic conditions
2 parents 79f1f73 + 6c5cc79 commit 47f8f85

File tree

3 files changed

+4
-1
lines changed

3 files changed

+4
-1
lines changed

.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
language: go
22

33
go:
4-
- "1.12"
4+
- "1.12.x"
55

66
os:
77
- linux

extension/kafka.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,12 +47,14 @@ func NewCommitOffset(consumer *kafka.Consumer) *CommitOffset {
4747
}
4848

4949
// Via streams data through given flow
50+
// panics on invalid message type
5051
func (co *CommitOffset) Via(flow streams.Flow) streams.Flow {
5152
go co.loop(flow)
5253
return flow
5354
}
5455

5556
// To streams data to given sink
57+
// panics on invalid message type
5658
func (co *CommitOffset) To(sink streams.Sink) {
5759
co.loop(sink)
5860
}

flow/throttler.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,7 @@ func (th *Throttler) doNotify() {
8383
}
8484

8585
//prefill buffer
86+
//panics on Unsupported ThrottleMode
8687
func (th *Throttler) bufferize() {
8788
defer close(th.out)
8889
if th.mode == Discard {

0 commit comments

Comments
 (0)