mirror of
https://github.com/containers/podman.git
synced 2025-10-25 18:25:59 +08:00
Fix spelling "setup" -> "set up" and similar
* Replace "setup", "lookup", "cleanup", "backup" with "set up", "look up", "clean up", "back up" when used as verbs. Replace also variations of those. * Improve language in a few places. Signed-off-by: Erik Sjölund <erik.sjolund@gmail.com>
This commit is contained in:
@ -38,7 +38,7 @@ import (
|
||||
)
|
||||
|
||||
// getContainersAndInputByContext gets containers whether all, latest, or a slice of names/ids
|
||||
// is specified. It also returns a list of the corresponding input name used to lookup each container.
|
||||
// is specified. It also returns a list of the corresponding input name used to look up each container.
|
||||
func getContainersAndInputByContext(all, latest bool, names []string, runtime *libpod.Runtime) (ctrs []*libpod.Container, rawInput []string, err error) {
|
||||
var ctr *libpod.Container
|
||||
ctrs = []*libpod.Container{}
|
||||
@ -183,7 +183,7 @@ func (ic *ContainerEngine) ContainerStop(ctx context.Context, namesOrIds []strin
|
||||
if err != nil {
|
||||
// Issue #7384 and #11384: If the container is configured for
|
||||
// auto-removal, it might already have been removed at this point.
|
||||
// We still need to to cleanup since we do not know if the other cleanup process is successful
|
||||
// We still need to clean up since we do not know if the other cleanup process is successful
|
||||
if c.AutoRemove() && (errors.Is(err, define.ErrNoSuchCtr) || errors.Is(err, define.ErrCtrRemoved)) {
|
||||
return nil
|
||||
}
|
||||
@ -488,7 +488,7 @@ func (ic *ContainerEngine) ContainerTop(ctx context.Context, options entities.To
|
||||
container, err = ic.Libpod.LookupContainer(options.NameOrID)
|
||||
}
|
||||
if err != nil {
|
||||
return nil, errors.Wrap(err, "unable to lookup requested container")
|
||||
return nil, errors.Wrap(err, "unable to look up requested container")
|
||||
}
|
||||
|
||||
// Run Top.
|
||||
@ -635,13 +635,13 @@ func (ic *ContainerEngine) ContainerRestore(ctx context.Context, namesOrIds []st
|
||||
containers, err = getContainersByContext(false, options.Latest, namesOrIds, ic.Libpod)
|
||||
default:
|
||||
for _, nameOrID := range namesOrIds {
|
||||
logrus.Debugf("lookup container: %q", nameOrID)
|
||||
logrus.Debugf("look up container: %q", nameOrID)
|
||||
ctr, err := ic.Libpod.LookupContainer(nameOrID)
|
||||
if err == nil {
|
||||
containers = append(containers, ctr)
|
||||
} else {
|
||||
// If container was not found, check if this is a checkpoint image
|
||||
logrus.Debugf("lookup image: %q", nameOrID)
|
||||
logrus.Debugf("look up image: %q", nameOrID)
|
||||
img, _, err := ic.Libpod.LibimageRuntime().LookupImage(nameOrID, nil)
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("no such container or image: %s", nameOrID)
|
||||
@ -1194,12 +1194,12 @@ func (ic *ContainerEngine) ContainerCleanup(ctx context.Context, namesOrIds []st
|
||||
var timeout *uint
|
||||
err = ic.Libpod.RemoveContainer(ctx, ctr, false, true, timeout)
|
||||
if err != nil {
|
||||
report.RmErr = errors.Wrapf(err, "failed to cleanup and remove container %v", ctr.ID())
|
||||
report.RmErr = errors.Wrapf(err, "failed to clean up and remove container %v", ctr.ID())
|
||||
}
|
||||
} else {
|
||||
err := ctr.Cleanup(ctx)
|
||||
if err != nil {
|
||||
report.CleanErr = errors.Wrapf(err, "failed to cleanup container %v", ctr.ID())
|
||||
report.CleanErr = errors.Wrapf(err, "failed to clean up container %v", ctr.ID())
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -393,7 +393,7 @@ func (ic *ContainerEngine) PodTop(ctx context.Context, options entities.PodTopOp
|
||||
pod, err = ic.Libpod.LookupPod(options.NameOrID)
|
||||
}
|
||||
if err != nil {
|
||||
return nil, errors.Wrap(err, "unable to lookup requested container")
|
||||
return nil, errors.Wrap(err, "unable to look up requested container")
|
||||
}
|
||||
|
||||
// Run Top.
|
||||
@ -494,7 +494,7 @@ func (ic *ContainerEngine) PodInspect(ctx context.Context, options entities.PodI
|
||||
pod, err = ic.Libpod.LookupPod(options.NameOrID)
|
||||
}
|
||||
if err != nil {
|
||||
return nil, errors.Wrap(err, "unable to lookup requested container")
|
||||
return nil, errors.Wrap(err, "unable to look up requested container")
|
||||
}
|
||||
inspect, err := pod.Inspect()
|
||||
if err != nil {
|
||||
|
||||
@ -404,9 +404,9 @@ func (ic *ContainerEngine) Unshare(ctx context.Context, args []string, options e
|
||||
}
|
||||
// Make sure to unlock, unshare can run for a long time.
|
||||
rootlessNetNS.Lock.Unlock()
|
||||
// We do not want to cleanup the netns after unshare.
|
||||
// The problem is that we cannot know if we need to cleanup and
|
||||
// secondly unshare should allow user to setup the namespace with
|
||||
// We do not want to clean up the netns after unshare.
|
||||
// The problem is that we cannot know if we need to clean up and
|
||||
// secondly unshare should allow user to set up the namespace with
|
||||
// special things, e.g. potentially macvlan or something like that.
|
||||
return rootlessNetNS.Do(unshare)
|
||||
}
|
||||
|
||||
@ -342,7 +342,7 @@ func ParseIDMapping(mode namespaces.UsernsMode, uidMapSlice, gidMapSlice []strin
|
||||
|
||||
options.HostUIDMapping = false
|
||||
options.HostGIDMapping = false
|
||||
// Simply ignore the setting and do not setup an inner namespace for root as it is a no-op
|
||||
// Simply ignore the setting and do not set up an inner namespace for root as it is a no-op
|
||||
return &options, nil
|
||||
}
|
||||
|
||||
@ -394,7 +394,7 @@ func ParseIDMapping(mode namespaces.UsernsMode, uidMapSlice, gidMapSlice []strin
|
||||
|
||||
// StartWatcher starts a new SIGHUP go routine for the current config.
|
||||
func StartWatcher(rt *libpod.Runtime) {
|
||||
// Setup the signal notifier
|
||||
// Set up the signal notifier
|
||||
ch := make(chan os.Signal, 1)
|
||||
signal.Notify(ch, syscall.SIGHUP)
|
||||
|
||||
|
||||
@ -20,7 +20,7 @@ func getContainersByContext(contextWithConnection context.Context, all, ignore b
|
||||
|
||||
func getContainersAndInputByContext(contextWithConnection context.Context, all, ignore bool, namesOrIDs []string) ([]entities.ListContainer, []string, error) {
|
||||
if all && len(namesOrIDs) > 0 {
|
||||
return nil, nil, errors.New("cannot lookup containers and all")
|
||||
return nil, nil, errors.New("cannot look up containers and all")
|
||||
}
|
||||
options := new(containers.ListOptions).WithAll(true).WithSync(true)
|
||||
allContainers, err := containers.List(contextWithConnection, options)
|
||||
@ -77,7 +77,7 @@ func getContainersAndInputByContext(contextWithConnection context.Context, all,
|
||||
|
||||
func getPodsByContext(contextWithConnection context.Context, all bool, namesOrIDs []string) ([]*entities.ListPodsReport, error) {
|
||||
if all && len(namesOrIDs) > 0 {
|
||||
return nil, errors.New("cannot lookup specific pods and all")
|
||||
return nil, errors.New("cannot look up specific pods and all")
|
||||
}
|
||||
|
||||
allPods, err := pods.List(contextWithConnection, nil)
|
||||
|
||||
Reference in New Issue
Block a user