9 // IOReaderFactory takes in an io.Reader and returns a function that will allow you to create a new reader that begins
10 // at the start of the stream
11 func IOReaderFactory(r io.Reader) (func() io.Reader, error) {
12 b, err := ioutil.ReadAll(r)
17 return func() io.Reader {
18 return bytes.NewReader(b)