cli/command/image: un-export RunSave

This function was exported in e43c7920ea950b0c8f2004bce114e71f7f993854
for use of "docker app", which is now deprecated. The signature of this
function also depended on a non-exported type, so it could not be used
externally.

Make it internal again, as it was never designed to be exported. There
are no known external consumers of this function.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
Sebastiaan van Stijn 2025-03-31 19:12:01 +02:00
parent 9b2479dca7
commit b557e37a49
No known key found for this signature in database
GPG Key ID: 76698F39D527CE8C

View File

@ -29,7 +29,7 @@ func NewSaveCommand(dockerCli command.Cli) *cobra.Command {
Args: cli.RequiresMinArgs(1),
RunE: func(cmd *cobra.Command, args []string) error {
opts.images = args
return RunSave(cmd.Context(), dockerCli, opts)
return runSave(cmd.Context(), dockerCli, opts)
},
Annotations: map[string]string{
"aliases": "docker image save, docker save",
@ -47,8 +47,8 @@ func NewSaveCommand(dockerCli command.Cli) *cobra.Command {
return cmd
}
// RunSave performs a save against the engine based on the specified options
func RunSave(ctx context.Context, dockerCli command.Cli, opts saveOptions) error {
// runSave performs a save against the engine based on the specified options
func runSave(ctx context.Context, dockerCli command.Cli, opts saveOptions) error {
if opts.output == "" && dockerCli.Out().IsTerminal() {
return errors.New("cowardly refusing to save to a terminal. Use the -o flag or redirect")
}