summaryrefslogtreecommitdiff
path: root/packbuilder.go
diff options
context:
space:
mode:
authorCarlos Martín Nieto <[email protected]>2013-06-17 01:55:36 +0200
committerCarlos Martín Nieto <[email protected]>2013-06-17 01:55:36 +0200
commita33875f9c5479b8bb78835b630ce60507c70f2a8 (patch)
tree6a3fce36a4200d6692e943476a99f132327268bd /packbuilder.go
parent62f65d071d0671fb53aaca54a2d59a636267c2b0 (diff)
Packbuilder: compilation fixes
Don't name the return values, as they conflict with the names we want inside and the types don't match what we want to have inside. We need them to be two-way channels in the function, and then pass unidirectional references to the different functions.
Diffstat (limited to 'packbuilder.go')
-rw-r--r--packbuilder.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/packbuilder.go b/packbuilder.go
index 292604d..bcb61a4 100644
--- a/packbuilder.go
+++ b/packbuilder.go
@@ -121,7 +121,7 @@ func (pb *Packbuilder) forEachWrap(data *packbuilderCbData) {
// you want to stop the pack-building process (e.g. there's an error
// writing to the output), close or write a value into the "stop"
// channel.
-func (pb *Packbuilder) ForEach() (data <-chan []byte, stop chan<- bool) {
+func (pb *Packbuilder) ForEach() (<-chan []byte, chan<- bool) {
ch := make(chan []byte)
stop := make(chan bool)
data := packbuilderCbData{ch, stop}