mirror of
https://github.com/containers/podman.git
synced 2025-06-23 18:59:30 +08:00
Fix typo
[NO NEW TESTS NEEDED] Signed-off-by: Radostin Stoyanov <rstoyanov@fedoraproject.org>
This commit is contained in:
@ -79,7 +79,7 @@ func Restore(ctx context.Context, nameOrID string, options *RestoreOptions) (*en
|
|||||||
|
|
||||||
// Open the to-be-imported archive if needed.
|
// Open the to-be-imported archive if needed.
|
||||||
var r io.Reader
|
var r io.Reader
|
||||||
if i := options.GetImportAchive(); i != "" {
|
if i := options.GetImportArchive(); i != "" {
|
||||||
params.Set("import", "true")
|
params.Set("import", "true")
|
||||||
r, err = os.Open(i)
|
r, err = os.Open(i)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
@ -64,7 +64,7 @@ type RestoreOptions struct {
|
|||||||
IgnoreVolumes *bool
|
IgnoreVolumes *bool
|
||||||
IgnoreStaticIP *bool
|
IgnoreStaticIP *bool
|
||||||
IgnoreStaticMAC *bool
|
IgnoreStaticMAC *bool
|
||||||
ImportAchive *string
|
ImportArchive *string
|
||||||
Keep *bool
|
Keep *bool
|
||||||
Name *string
|
Name *string
|
||||||
TCPEstablished *bool
|
TCPEstablished *bool
|
||||||
|
@ -77,19 +77,19 @@ func (o *RestoreOptions) GetIgnoreStaticMAC() bool {
|
|||||||
return *o.IgnoreStaticMAC
|
return *o.IgnoreStaticMAC
|
||||||
}
|
}
|
||||||
|
|
||||||
// WithImportAchive set field ImportAchive to given value
|
// WithImportArchive set field ImportArchive to given value
|
||||||
func (o *RestoreOptions) WithImportAchive(value string) *RestoreOptions {
|
func (o *RestoreOptions) WithImportArchive(value string) *RestoreOptions {
|
||||||
o.ImportAchive = &value
|
o.ImportArchive = &value
|
||||||
return o
|
return o
|
||||||
}
|
}
|
||||||
|
|
||||||
// GetImportAchive returns value of field ImportAchive
|
// GetImportArchive returns value of field ImportArchive
|
||||||
func (o *RestoreOptions) GetImportAchive() string {
|
func (o *RestoreOptions) GetImportArchive() string {
|
||||||
if o.ImportAchive == nil {
|
if o.ImportArchive == nil {
|
||||||
var z string
|
var z string
|
||||||
return z
|
return z
|
||||||
}
|
}
|
||||||
return *o.ImportAchive
|
return *o.ImportArchive
|
||||||
}
|
}
|
||||||
|
|
||||||
// WithKeep set field Keep to given value
|
// WithKeep set field Keep to given value
|
||||||
|
@ -390,7 +390,7 @@ func (ic *ContainerEngine) ContainerRestore(ctx context.Context, namesOrIds []st
|
|||||||
options.WithPublishPorts(opts.PublishPorts)
|
options.WithPublishPorts(opts.PublishPorts)
|
||||||
|
|
||||||
if opts.Import != "" {
|
if opts.Import != "" {
|
||||||
options.WithImportAchive(opts.Import)
|
options.WithImportArchive(opts.Import)
|
||||||
report, err := containers.Restore(ic.ClientCtx, "", options)
|
report, err := containers.Restore(ic.ClientCtx, "", options)
|
||||||
return []*entities.RestoreReport{report}, err
|
return []*entities.RestoreReport{report}, err
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user