From 3a1bbbdf9dcdf88c909ea9df127f32b126d38547 Mon Sep 17 00:00:00 2001 From: Axel Wagner Date: Thu, 16 May 2013 16:53:21 +0200 Subject: [PATCH] Correct some errors from 1da989e --- packbuilder.go | 5 +++-- 1 file 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