Merge pull request #13499 from rst0git/fix-typo

Fix typo
This commit is contained in:
OpenShift Merge Robot
2022-03-14 10:28:33 -04:00
committed by GitHub
4 changed files with 10 additions and 10 deletions

View File

@ -79,7 +79,7 @@ func Restore(ctx context.Context, nameOrID string, options *RestoreOptions) (*en
// Open the to-be-imported archive if needed.
var r io.Reader
if i := options.GetImportAchive(); i != "" {
if i := options.GetImportArchive(); i != "" {
params.Set("import", "true")
r, err = os.Open(i)
if err != nil {

View File

@ -64,7 +64,7 @@ type RestoreOptions struct {
IgnoreVolumes *bool
IgnoreStaticIP *bool
IgnoreStaticMAC *bool
ImportAchive *string
ImportArchive *string
Keep *bool
Name *string
TCPEstablished *bool

View File

@ -77,19 +77,19 @@ func (o *RestoreOptions) GetIgnoreStaticMAC() bool {
return *o.IgnoreStaticMAC
}
// WithImportAchive set field ImportAchive to given value
func (o *RestoreOptions) WithImportAchive(value string) *RestoreOptions {
o.ImportAchive = &value
// WithImportArchive set field ImportArchive to given value
func (o *RestoreOptions) WithImportArchive(value string) *RestoreOptions {
o.ImportArchive = &value
return o
}
// GetImportAchive returns value of field ImportAchive
func (o *RestoreOptions) GetImportAchive() string {
if o.ImportAchive == nil {
// GetImportArchive returns value of field ImportArchive
func (o *RestoreOptions) GetImportArchive() string {
if o.ImportArchive == nil {
var z string
return z
}
return *o.ImportAchive
return *o.ImportArchive
}
// WithKeep set field Keep to given value

View File

@ -390,7 +390,7 @@ func (ic *ContainerEngine) ContainerRestore(ctx context.Context, namesOrIds []st
options.WithPublishPorts(opts.PublishPorts)
if opts.Import != "" {
options.WithImportAchive(opts.Import)
options.WithImportArchive(opts.Import)
report, err := containers.Restore(ic.ClientCtx, "", options)
return []*entities.RestoreReport{report}, err
}