Skip to content

Instantly share code, notes, and snippets.

@cmelbye
Created August 13, 2014 18:06
Show Gist options
  • Save cmelbye/997a90e80dedf25dc88f to your computer and use it in GitHub Desktop.
Save cmelbye/997a90e80dedf25dc88f to your computer and use it in GitHub Desktop.
type bodyReader struct {
body []byte
}
func (r bodyReader) Bytes() []byte {
return r.body
}
func (r bodyReader) Read(b []byte) (int, error) {
return 0, errors.New("storage: bodyReader.Read() is not implemented and should not be used")
}
func (r bodyReader) Close() error {
return nil
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment