Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tree: fa7ec0611c
Fetching contributors…

Cannot retrieve contributors at this time

file 17 lines (13 sloc) 0.216 kb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
package mogrify

import (
  "bytes"
  "io"
)

func drain(reader io.Reader) []byte {
  var buffer bytes.Buffer

  _, err := buffer.ReadFrom(reader)
  if err != nil {
    return []byte{}
  }

  return buffer.Bytes()
}
Something went wrong with that request. Please try again.