Commit 0c7b5569 authored by Joshua Gutow's avatar Joshua Gutow

Return errors to make lint happy

parent c35fc663
......@@ -47,8 +47,12 @@ func (p *Page) MarshalJSON() ([]byte, error) {
w := zlibWriterPool.Get().(*zlib.Writer)
defer zlibWriterPool.Put(w)
w.Reset(&out)
w.Write(p[:])
w.Close()
if _, err := w.Write(p[:]); err != nil {
return nil, err
}
if err := w.Close(); err != nil {
return nil, err
}
return json.Marshal(out.Bytes())
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment