mirror of
https://github.com/regclient/regclient.git
synced 2025-07-27 21:41:46 +03:00
Blob changing from ReadCloser to Reader
Close and Seek methods are used when available. Forcing a Closer resulted in a NoopCloser that blocked Seek. Signed-off-by: Brandon Mitchell <git@bmitch.net>
This commit is contained in:
@ -19,7 +19,7 @@ type BlobConfig struct {
|
||||
header http.Header
|
||||
image ociv1.Image
|
||||
r ref.Ref
|
||||
rc io.ReadCloser
|
||||
rdr io.Reader
|
||||
resp *http.Response
|
||||
}
|
||||
|
||||
@ -41,9 +41,9 @@ func WithImage(image ociv1.Image) Opts {
|
||||
bc.image = image
|
||||
}
|
||||
}
|
||||
func WithReadCloser(rc io.ReadCloser) Opts {
|
||||
func WithReader(rc io.Reader) Opts {
|
||||
return func(bc *BlobConfig) {
|
||||
bc.rc = rc
|
||||
bc.rdr = rc
|
||||
}
|
||||
}
|
||||
func WithRef(r ref.Ref) Opts {
|
||||
|
Reference in New Issue
Block a user