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.
This commit is contained in:
Carlos Martín Nieto 2013-06-17 01:55:36 +02:00
parent 62f65d071d
commit a33875f9c5
2 changed files with 1 additions and 2 deletions

1
git.go
View File

@ -11,7 +11,6 @@ import (
"errors"
"unsafe"
"strings"
"fmt"
)
const (

View File

@ -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}