converted stream reader to io.ReadCloser

This commit is contained in:
Brad Rydzewski
2016-04-22 18:15:07 -07:00
parent f8a2a32383
commit b9037b9d7c
5 changed files with 19 additions and 9 deletions

View File

@@ -12,7 +12,7 @@ import (
type Stream interface {
Create(string) error
Delete(string) error
Reader(string) (io.Reader, error)
Reader(string) (io.ReadCloser, error)
Writer(string) (io.WriteCloser, error)
}
@@ -22,7 +22,7 @@ func Create(c context.Context, key string) error {
}
// Reader opens the stream for reading.
func Reader(c context.Context, key string) (io.Reader, error) {
func Reader(c context.Context, key string) (io.ReadCloser, error) {
return FromContext(c).Reader(key)
}