https://github.com/fishy/wrapreader
Go library to wrap io.Reader and io.Closer together
https://github.com/fishy/wrapreader
go golang library
Last synced: 2 months ago
JSON representation
Go library to wrap io.Reader and io.Closer together
- Host: GitHub
- URL: https://github.com/fishy/wrapreader
- Owner: fishy
- License: bsd-3-clause
- Created: 2018-05-28T21:04:32.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2020-08-23T00:08:28.000Z (almost 5 years ago)
- Last Synced: 2025-03-02T00:02:43.204Z (3 months ago)
- Topics: go, golang, library
- Language: Go
- Homepage: https://godoc.org/github.com/fishy/wrapreader
- Size: 6.84 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
[](https://pkg.go.dev/github.com/fishy/wrapreader)
[](https://goreportcard.com/report/github.com/fishy/wrapreader)# WrapReader
WrapReader is a [Go](https://golang.org)
[library](https://pkg.go.dev/github.com/fishy/wrapreader).
It provides an [`io.ReadCloser`](https://pkg.go.dev/io?tab=doc#ReadCloser)
that wraps an [`io.Reader`](https://pkg.go.dev/io?tab=doc#Reader) and
an [`io.Closer`](https://pkg.go.dev/io?tab=doc#Closer) together.It's useful when dealing with `io.Reader` implementations that wraps another
`io.ReadCloser`, but will not close the underlying reader, such as
[`gzip.Reader`](https://pkg.go.dev/compress/gzip?tab=doc#Reader).([Example code](https://pkg.go.dev/github.com/fishy/wrapreader?tab=doc#example-Wrap))