mirror of
https://github.com/moby/moby.git
synced 2026-01-11 18:51:37 +00:00
client: Client.ImageLoad: move description of platform parameter
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
@@ -7,13 +7,9 @@ import (
|
||||
"net/url"
|
||||
)
|
||||
|
||||
// ImageLoad loads an image in the docker host from the client host.
|
||||
// It's up to the caller to close the [io.ReadCloser] in the
|
||||
// [ImageLoadResult] returned by this function.
|
||||
//
|
||||
// Platform is an optional parameter that specifies the platform to load from
|
||||
// the provided multi-platform image. Passing a platform only has an effect
|
||||
// if the input image is a multi-platform image.
|
||||
// ImageLoad loads an image in the docker host from the client host. It's up
|
||||
// to the caller to close the [io.ReadCloser] in the [ImageLoadResult]
|
||||
// returned by this function.
|
||||
func (cli *Client) ImageLoad(ctx context.Context, input io.Reader, loadOpts ...ImageLoadOption) (ImageLoadResult, error) {
|
||||
var opts imageLoadOpts
|
||||
for _, opt := range loadOpts {
|
||||
|
||||
@@ -38,6 +38,10 @@ func ImageLoadWithQuiet(quiet bool) ImageLoadOption {
|
||||
}
|
||||
|
||||
// ImageLoadWithPlatforms sets the platforms to be loaded from the image.
|
||||
//
|
||||
// Platform is an optional parameter that specifies the platform to load from
|
||||
// the provided multi-platform image. Passing a platform only has an effect
|
||||
// if the input image is a multi-platform image.
|
||||
func ImageLoadWithPlatforms(platforms ...ocispec.Platform) ImageLoadOption {
|
||||
return imageLoadOptionFunc(func(opt *imageLoadOpts) error {
|
||||
if opt.apiOptions.Platforms != nil {
|
||||
|
||||
10
vendor/github.com/moby/moby/client/image_load.go
generated
vendored
10
vendor/github.com/moby/moby/client/image_load.go
generated
vendored
@@ -7,13 +7,9 @@ import (
|
||||
"net/url"
|
||||
)
|
||||
|
||||
// ImageLoad loads an image in the docker host from the client host.
|
||||
// It's up to the caller to close the [io.ReadCloser] in the
|
||||
// [ImageLoadResult] returned by this function.
|
||||
//
|
||||
// Platform is an optional parameter that specifies the platform to load from
|
||||
// the provided multi-platform image. Passing a platform only has an effect
|
||||
// if the input image is a multi-platform image.
|
||||
// ImageLoad loads an image in the docker host from the client host. It's up
|
||||
// to the caller to close the [io.ReadCloser] in the [ImageLoadResult]
|
||||
// returned by this function.
|
||||
func (cli *Client) ImageLoad(ctx context.Context, input io.Reader, loadOpts ...ImageLoadOption) (ImageLoadResult, error) {
|
||||
var opts imageLoadOpts
|
||||
for _, opt := range loadOpts {
|
||||
|
||||
4
vendor/github.com/moby/moby/client/image_load_opts.go
generated
vendored
4
vendor/github.com/moby/moby/client/image_load_opts.go
generated
vendored
@@ -38,6 +38,10 @@ func ImageLoadWithQuiet(quiet bool) ImageLoadOption {
|
||||
}
|
||||
|
||||
// ImageLoadWithPlatforms sets the platforms to be loaded from the image.
|
||||
//
|
||||
// Platform is an optional parameter that specifies the platform to load from
|
||||
// the provided multi-platform image. Passing a platform only has an effect
|
||||
// if the input image is a multi-platform image.
|
||||
func ImageLoadWithPlatforms(platforms ...ocispec.Platform) ImageLoadOption {
|
||||
return imageLoadOptionFunc(func(opt *imageLoadOpts) error {
|
||||
if opt.apiOptions.Platforms != nil {
|
||||
|
||||
Reference in New Issue
Block a user