env: extend Reader{} to implement io.Closer
Signed-off-by: Alejandro Mery <amery@jpi.io>
This commit is contained in:
Vendored
+7
@@ -21,6 +21,13 @@ func (rd *Reader) Read(b []byte) (int, error) {
|
||||
return rd.in.Read(b)
|
||||
}
|
||||
|
||||
func (rd *Reader) Close() error {
|
||||
if f, ok := rd.in.(io.Closer); ok {
|
||||
return f.Close()
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
//
|
||||
// Constructors
|
||||
//
|
||||
|
||||
Reference in New Issue
Block a user