From a33875f9c5479b8bb78835b630ce60507c70f2a8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Carlos=20Mart=C3=ADn=20Nieto?= Date: Mon, 17 Jun 2013 01:55:36 +0200 Subject: [PATCH] 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. --- git.go | 1 - packbuilder.go | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/git.go b/git.go index d8cacc4..6f81293 100644 --- a/git.go +++ b/git.go @@ -11,7 +11,6 @@ import ( "errors" "unsafe" "strings" - "fmt" ) const ( 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}