diff options
-rw-r--r-- | transform/chain.go | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/transform/chain.go b/transform/chain.go index 7be38ccaa..fbcf0eff2 100644 --- a/transform/chain.go +++ b/transform/chain.go @@ -69,10 +69,14 @@ func (c *chain) Apply(w io.Writer, r io.Reader, p []byte) error { b1 := bp.GetBuffer() defer bp.PutBuffer(b1) - b1.ReadFrom(r) + if _, err := b1.ReadFrom(r); err != nil { + return err + } if len(*c) == 0 { - b1.WriteTo(w) + if _, err := b1.WriteTo(w); err != nil { + return err + } return nil } @@ -97,6 +101,6 @@ func (c *chain) Apply(w io.Writer, r io.Reader, p []byte) error { tr(fb) } - fb.to.WriteTo(w) - return nil + _, err := fb.to.WriteTo(w) + return err } |