mirror of
https://github.com/moby/moby.git
synced 2026-01-11 18:51:37 +00:00
client: make ImageImportResult an interface
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
@@ -19,22 +19,3 @@ type ImageImportOptions struct {
|
||||
Changes []string // Changes are the raw changes to apply to this image
|
||||
Platform ocispec.Platform // Platform is the target platform of the image
|
||||
}
|
||||
|
||||
// ImageImportResult holds the response body returned by the daemon for image import.
|
||||
type ImageImportResult struct {
|
||||
rc io.ReadCloser
|
||||
}
|
||||
|
||||
func (r ImageImportResult) Read(p []byte) (n int, err error) {
|
||||
if r.rc == nil {
|
||||
return 0, io.EOF
|
||||
}
|
||||
return r.rc.Read(p)
|
||||
}
|
||||
|
||||
func (r ImageImportResult) Close() error {
|
||||
if r.rc == nil {
|
||||
return nil
|
||||
}
|
||||
return r.rc.Close()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user