Skip to content

Commit a33875f

Browse files
committed
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.
1 parent 62f65d0 commit a33875f

File tree

2 files changed

+1
-2
lines changed

2 files changed

+1
-2
lines changed

git.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ import (
1111
"errors"
1212
"unsafe"
1313
"strings"
14-
"fmt"
1514
)
1615

1716
const (

packbuilder.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ func (pb *Packbuilder) forEachWrap(data *packbuilderCbData) {
121121
// you want to stop the pack-building process (e.g. there's an error
122122
// writing to the output), close or write a value into the "stop"
123123
// channel.
124-
func (pb *Packbuilder) ForEach() (data <-chan []byte, stop chan<- bool) {
124+
func (pb *Packbuilder) ForEach() (<-chan []byte, chan<- bool) {
125125
ch := make(chan []byte)
126126
stop := make(chan bool)
127127
data := packbuilderCbData{ch, stop}

0 commit comments

Comments
 (0)