Correct some errors from 1da989e

This commit is contained in:
Axel Wagner 2013-05-16 16:53:21 +02:00
parent 1da989e28b
commit 3a1bbbdf9d
1 changed files with 3 additions and 2 deletions

View File

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