summaryrefslogtreecommitdiff
path: root/packbuilder.go
diff options
context:
space:
mode:
Diffstat (limited to 'packbuilder.go')
-rw-r--r--packbuilder.go5
1 files changed, 3 insertions, 2 deletions
diff --git a/packbuilder.go b/packbuilder.go
index 6228e12..8cc03bd 100644
--- a/packbuilder.go
+++ b/packbuilder.go
@@ -13,6 +13,7 @@ import "C"
import (
"runtime"
"unsafe"
+ "io"
)
type Packbuilder struct {
@@ -75,8 +76,8 @@ func (pb *Packbuilder) WriteToFile(name string) error {
}
func (pb *Packbuilder) Write(w io.Writer) error {
- ch := pb.Foreach()
- for _, slice := range ch {
+ ch := pb.ForEach()
+ for slice := range ch {
_, err := w.Write(slice)
if err != nil {
return err