Skip to content

Commit 15caef9

Browse files
Merge pull request #17459 from eriksjolund/fix_spelling_typos_and_language
Fix typos. Improve language.
2 parents f0d863e + 08e1386 commit 15caef9

25 files changed

+50
-50
lines changed

cmd/podman/system/connection/add.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ func add(cmd *cobra.Command, args []string) error {
146146
info, err := os.Stat(uri.Path)
147147
switch {
148148
case errors.Is(err, os.ErrNotExist):
149-
logrus.Warnf("%q does not exists", uri.Path)
149+
logrus.Warnf("%q does not exist", uri.Path)
150150
case errors.Is(err, os.ErrPermission):
151151
logrus.Warnf("You do not have permission to read %q", uri.Path)
152152
case err != nil:

cmd/podman/utils/error.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ func (o OutputErrors) PrintErrors() (lastError error) {
2626
}
2727

2828
/*
29-
For remote client, server does not returns error with exit code
29+
For remote client, server does not return error with exit code
3030
3131
instead returns a message and we cast it to a new error.
3232
@@ -45,14 +45,14 @@ func ExitCodeFromBuildError(errorMsg string) (int, error) {
4545
return buildahCLI.ExecErrorCodeGeneric, err
4646
}
4747
}
48-
return buildahCLI.ExecErrorCodeGeneric, errors.New("message does not contains a valid exit code")
48+
return buildahCLI.ExecErrorCodeGeneric, errors.New("message does not contain a valid exit code")
4949
}
5050

5151
// HandleOSExecError checks the given error for an exec.ExitError error and
5252
// sets the same podman exit code as the error.
5353
// No error will be returned in this case to make sure things like podman
5454
// unshare false work correctly without extra output.
55-
// When the exec file does not exists we set the exit code to 127, for
55+
// When the exec file does not exist we set the exit code to 127, for
5656
// permission errors 126 is used as exit code. In this case we still return
5757
// the error so the user gets an error message.
5858
// If the error is nil it returns nil.

libpod/container_api.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -79,8 +79,8 @@ func (c *Container) Init(ctx context.Context, recursive bool) error {
7979
// ContainerStatePaused via Pause(), or to ContainerStateStopped by the process
8080
// stopping (either due to exit, or being forced to stop by the Kill or Stop API
8181
// calls).
82-
// Start requites that all dependency containers (e.g. pod infra containers) be
83-
// running before being run. The recursive parameter, if set, will start all
82+
// Start requires that all dependency containers (e.g. pod infra containers) are
83+
// running before starting the container. The recursive parameter, if set, will start all
8484
// dependencies before starting this container.
8585
func (c *Container) Start(ctx context.Context, recursive bool) (finalErr error) {
8686
defer func() {
@@ -850,7 +850,7 @@ func (c *Container) Batch(batchFunc func(*Container) error) error {
850850
// Most of the time, Podman does not explicitly query the OCI runtime for
851851
// container status, and instead relies upon exit files created by conmon.
852852
// This can cause a disconnect between running state and what Podman sees in
853-
// cases where Conmon was killed unexpected, or runc was upgraded.
853+
// cases where Conmon was killed unexpectedly, or runc was upgraded.
854854
// Running a manual Sync() ensures that container state will be correct in
855855
// such situations.
856856
func (c *Container) Sync() error {

libpod/container_config.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -367,7 +367,7 @@ type ContainerMiscConfig struct {
367367
// RestartPolicy indicates what action the container will take upon
368368
// exiting naturally.
369369
// Allowed options are "no" (take no action), "on-failure" (restart on
370-
// non-zero exit code, up an a maximum of RestartRetries times),
370+
// non-zero exit code, up to a maximum of RestartRetries times),
371371
// and "always" (always restart the container on any exit code).
372372
// The empty string is treated as the default ("no")
373373
RestartPolicy string `json:"restart_policy,omitempty"`

libpod/container_inspect.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,7 @@ func (c *Container) getContainerInspectData(size bool, driverData *define.Driver
185185
}
186186

187187
if c.config.HealthCheckConfig != nil {
188-
// This container has a healthcheck defined in it; we need to add it's state
188+
// This container has a healthcheck defined in it; we need to add its state
189189
healthCheckState, err := c.getHealthCheckLog()
190190
if err != nil {
191191
// An error here is not considered fatal; no health state will be displayed

libpod/container_internal_common.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -296,7 +296,7 @@ func (c *Container) generateSpec(ctx context.Context) (*spec.Spec, error) {
296296

297297
// Check if the spec file mounts contain the options z, Z, U or idmap.
298298
// If they have z or Z, relabel the source directory and then remove the option.
299-
// If they have U, chown the source directory and them remove the option.
299+
// If they have U, chown the source directory and then remove the option.
300300
// If they have idmap, then calculate the mappings to use in the OCI config file.
301301
for i := range g.Config.Mounts {
302302
m := &g.Config.Mounts[i]
@@ -1331,7 +1331,7 @@ func (c *Container) restore(ctx context.Context, options ContainerCheckpointOpti
13311331
}
13321332

13331333
// Let's try to stat() CRIU's inventory file. If it does not exist, it makes
1334-
// no sense to try a restore. This is a minimal check if a checkpoint exist.
1334+
// no sense to try a restore. This is a minimal check if a checkpoint exists.
13351335
if _, err := os.Stat(filepath.Join(c.CheckpointPath(), "inventory.img")); os.IsNotExist(err) {
13361336
return nil, 0, fmt.Errorf("a complete checkpoint for this container cannot be found, cannot restore: %w", err)
13371337
}

libpod/container_stat_common.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ func (c *Container) stat(containerMountPoint string, containerPath string) (*def
6060
}
6161
// Not all errors from secureStat map to ErrNotExist, so we
6262
// have to look into the error string. Turning it into an
63-
// ENOENT let's the API handlers return the correct status code
63+
// ENOENT lets the API handlers return the correct status code
6464
// which is crucial for the remote client.
6565
if os.IsNotExist(statErr) || strings.Contains(statErr.Error(), "o such file or directory") {
6666
statErr = copy.ErrENOENT

libpod/define/container.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ var RestartPolicyMap = map[string]string{
2929

3030
// InitContainerTypes
3131
const (
32-
// AlwaysInitContainer is an init container than runs on each
32+
// AlwaysInitContainer is an init container that runs on each
3333
// pod start (including restart)
3434
AlwaysInitContainer = "always"
3535
// OneShotInitContainer is a container that only runs as init once

libpod/events/nullout.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import (
66
)
77

88
// EventToNull is an eventer type that does nothing.
9-
// It is meant for unittests only
9+
// It is meant for unit tests only
1010
type EventToNull struct{}
1111

1212
// Write eats the event and always returns nil

libpod/lock/shm/shm_lock.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,7 @@ shm_struct_t *setup_lock_shm(char *path, uint32_t num_locks, int *error_code) {
204204
// Returns a valid pointer on success or NULL on error.
205205
// If an error occurs, negative ERRNO values will be written to error_code.
206206
// ERANGE is returned for a mismatch between num_locks and the number of locks
207-
// available in the the SHM lock struct.
207+
// available in the SHM lock struct.
208208
shm_struct_t *open_lock_shm(char *path, uint32_t num_locks, int *error_code) {
209209
int shm_fd;
210210
shm_struct_t *shm;

libpod/logs/log.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ func getTailLog(path string, tail int) ([]*LogLine, error) {
143143
nllCounter++
144144
}
145145
}
146-
// if we have enough log lines, we can hangup
146+
// if we have enough log lines, we can hang up
147147
if nllCounter >= tail {
148148
break
149149
}
@@ -244,7 +244,7 @@ func NewLogLine(line string) (*LogLine, error) {
244244
}
245245

246246
// NewJournaldLogLine creates a LogLine from the specified line from journald.
247-
// Note that if withID is set, the first item of the message is considerred to
247+
// Note that if withID is set, the first item of the message is considered to
248248
// be the container ID and set as such.
249249
func NewJournaldLogLine(line string, withID bool) (*LogLine, error) {
250250
splitLine := strings.Split(line, " ")

libpod/networking_freebsd.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ func (r *RootlessNetNS) Cleanup(runtime *Runtime) error {
9898
}
9999

100100
// GetRootlessNetNs returns the rootless netns object. If create is set to true
101-
// the rootless network namespace will be created if it does not exists already.
101+
// the rootless network namespace will be created if it does not already exist.
102102
// If called as root it returns always nil.
103103
// On success the returned RootlessCNI lock is locked and must be unlocked by the caller.
104104
func (r *Runtime) GetRootlessNetNs(new bool) (*RootlessNetNS, error) {

libpod/networking_linux.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ func (r *RootlessNetNS) Do(toRun func() error) error {
7878
// 1. XDG_RUNTIME_DIR -> XDG_RUNTIME_DIR/rootless-netns/XDG_RUNTIME_DIR
7979
// 2. /run/systemd -> XDG_RUNTIME_DIR/rootless-netns/run/systemd (only if it exists)
8080
// 3. XDG_RUNTIME_DIR/rootless-netns/resolv.conf -> /etc/resolv.conf or XDG_RUNTIME_DIR/rootless-netns/run/symlink/target
81-
// 4. XDG_RUNTIME_DIR/rootless-netns/var/lib/cni -> /var/lib/cni (if /var/lib/cni does not exists use the parent dir)
81+
// 4. XDG_RUNTIME_DIR/rootless-netns/var/lib/cni -> /var/lib/cni (if /var/lib/cni does not exist, use the parent dir)
8282
// 5. XDG_RUNTIME_DIR/rootless-netns/run -> /run
8383

8484
// Create a new mount namespace,
@@ -124,7 +124,7 @@ func (r *RootlessNetNS) Do(toRun func() error) error {
124124
// If /etc/resolv.conf has more than one symlink under /run, e.g.
125125
// -> /run/systemd/resolve/stub-resolv.conf -> /run/systemd/resolve/resolv.conf
126126
// we would put the netns resolv.conf file to the last path. However this will
127-
// break dns because the second link does not exists in the mount ns.
127+
// break dns because the second link does not exist in the mount ns.
128128
// see https://github.com/containers/podman/issues/11222
129129
//
130130
// We also need to resolve all path components not just the last file.
@@ -255,7 +255,7 @@ func (r *RootlessNetNS) Do(toRun func() error) error {
255255
func (r *RootlessNetNS) Cleanup(runtime *Runtime) error {
256256
_, err := os.Stat(r.dir)
257257
if os.IsNotExist(err) {
258-
// the directory does not exists no need for cleanup
258+
// the directory does not exist, so no need for cleanup
259259
return nil
260260
}
261261
activeNetns := func(c *Container) bool {
@@ -322,7 +322,7 @@ func (r *RootlessNetNS) Cleanup(runtime *Runtime) error {
322322
}
323323

324324
// GetRootlessNetNs returns the rootless netns object. If create is set to true
325-
// the rootless network namespace will be created if it does not exists already.
325+
// the rootless network namespace will be created if it does not already exist.
326326
// If called as root it returns always nil.
327327
// On success the returned RootlessCNI lock is locked and must be unlocked by the caller.
328328
func (r *Runtime) GetRootlessNetNs(new bool) (*RootlessNetNS, error) {

libpod/networking_slirp4netns.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -249,7 +249,7 @@ func (r *Runtime) setupSlirp4netns(ctr *Container, netns string) error {
249249
return err
250250
}
251251

252-
// the slirp4netns arguments being passed are describes as follows:
252+
// the slirp4netns arguments being passed are described as follows:
253253
// from the slirp4netns documentation: https://github.com/rootless-containers/slirp4netns
254254
// -c, --configure Brings up the tap interface
255255
// -e, --exit-fd=FD specify the FD for terminating slirp4netns
@@ -317,7 +317,7 @@ func (r *Runtime) setupSlirp4netns(ctr *Container, netns string) error {
317317
go func() {
318318
err := ns.WithNetNSPath(netnsPath, func(_ ns.NetNS) error {
319319
// Duplicate Address Detection slows the ipv6 setup down for 1-2 seconds.
320-
// Since slirp4netns is run it is own namespace and not directly routed
320+
// Since slirp4netns is run in its own namespace and not directly routed
321321
// we can skip this to make the ipv6 address immediately available.
322322
// We change the default to make sure the slirp tap interface gets the
323323
// correct value assigned so DAD is disabled for it
@@ -326,7 +326,7 @@ func (r *Runtime) setupSlirp4netns(ctr *Container, netns string) error {
326326
orgValue, err := os.ReadFile(ipv6ConfDefaultAcceptDadSysctl)
327327
if err != nil {
328328
netnsReadyWg.Done()
329-
// on ipv6 disabled systems the sysctl does not exists
329+
// on ipv6 disabled systems the sysctl does not exist
330330
// so we should not error
331331
if errors.Is(err, os.ErrNotExist) {
332332
return nil

libpod/networking_unsupported.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ func (r *RootlessNetNS) Cleanup(runtime *Runtime) error {
7272
}
7373

7474
// GetRootlessNetNs returns the rootless netns object. If create is set to true
75-
// the rootless network namespace will be created if it does not exists already.
75+
// the rootless network namespace will be created if it does not already exist.
7676
// If called as root it returns always nil.
7777
// On success the returned RootlessCNI lock is locked and must be unlocked by the caller.
7878
func (r *Runtime) GetRootlessNetNs(new bool) (*RootlessNetNS, error) {

libpod/options.go

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -850,7 +850,7 @@ func WithIDMappings(idmappings storage.IDMappingOptions) CtrCreateOption {
850850
}
851851
}
852852

853-
// WithUTSNSFromPod indicates the the container should join the UTS namespace of
853+
// WithUTSNSFromPod indicates that the container should join the UTS namespace of
854854
// its pod
855855
func WithUTSNSFromPod(p *Pod) CtrCreateOption {
856856
return func(ctr *Container) error {
@@ -872,7 +872,7 @@ func WithUTSNSFromPod(p *Pod) CtrCreateOption {
872872
}
873873
}
874874

875-
// WithIPCNSFrom indicates the the container should join the IPC namespace of
875+
// WithIPCNSFrom indicates that the container should join the IPC namespace of
876876
// the given container.
877877
// If the container has joined a pod, it can only join the namespaces of
878878
// containers in the same pod.
@@ -892,7 +892,7 @@ func WithIPCNSFrom(nsCtr *Container) CtrCreateOption {
892892
}
893893
}
894894

895-
// WithMountNSFrom indicates the the container should join the mount namespace
895+
// WithMountNSFrom indicates that the container should join the mount namespace
896896
// of the given container.
897897
// If the container has joined a pod, it can only join the namespaces of
898898
// containers in the same pod.
@@ -911,7 +911,7 @@ func WithMountNSFrom(nsCtr *Container) CtrCreateOption {
911911
}
912912
}
913913

914-
// WithNetNSFrom indicates the the container should join the network namespace
914+
// WithNetNSFrom indicates that the container should join the network namespace
915915
// of the given container.
916916
// If the container has joined a pod, it can only join the namespaces of
917917
// containers in the same pod.
@@ -931,7 +931,7 @@ func WithNetNSFrom(nsCtr *Container) CtrCreateOption {
931931
}
932932
}
933933

934-
// WithPIDNSFrom indicates the the container should join the PID namespace of
934+
// WithPIDNSFrom indicates that the container should join the PID namespace of
935935
// the given container.
936936
// If the container has joined a pod, it can only join the namespaces of
937937
// containers in the same pod.
@@ -965,7 +965,7 @@ func WithAddCurrentUserPasswdEntry() CtrCreateOption {
965965
}
966966
}
967967

968-
// WithUserNSFrom indicates the the container should join the user namespace of
968+
// WithUserNSFrom indicates that the container should join the user namespace of
969969
// the given container.
970970
// If the container has joined a pod, it can only join the namespaces of
971971
// containers in the same pod.
@@ -1000,7 +1000,7 @@ func WithUserNSFrom(nsCtr *Container) CtrCreateOption {
10001000
}
10011001
}
10021002

1003-
// WithUTSNSFrom indicates the the container should join the UTS namespace of
1003+
// WithUTSNSFrom indicates that the container should join the UTS namespace of
10041004
// the given container.
10051005
// If the container has joined a pod, it can only join the namespaces of
10061006
// containers in the same pod.
@@ -1020,7 +1020,7 @@ func WithUTSNSFrom(nsCtr *Container) CtrCreateOption {
10201020
}
10211021
}
10221022

1023-
// WithCgroupNSFrom indicates the the container should join the Cgroup namespace
1023+
// WithCgroupNSFrom indicates that the container should join the Cgroup namespace
10241024
// of the given container.
10251025
// If the container has joined a pod, it can only join the namespaces of
10261026
// containers in the same pod.
@@ -1224,7 +1224,7 @@ func WithDNS(dnsServers []string) CtrCreateOption {
12241224
}
12251225
}
12261226

1227-
// WithDNSOption sets addition dns options for the container.
1227+
// WithDNSOption sets additional dns options for the container.
12281228
func WithDNSOption(dnsOptions []string) CtrCreateOption {
12291229
return func(ctr *Container) error {
12301230
if ctr.valid {
@@ -1538,7 +1538,7 @@ func WithCreateCommand(cmd []string) CtrCreateOption {
15381538
}
15391539
}
15401540

1541-
// withIsInfra allows us to dfferentiate between infra containers and other containers
1541+
// withIsInfra allows us to differentiate between infra containers and other containers
15421542
// within the container config
15431543
func withIsInfra() CtrCreateOption {
15441544
return func(ctr *Container) error {
@@ -1552,7 +1552,7 @@ func withIsInfra() CtrCreateOption {
15521552
}
15531553
}
15541554

1555-
// WithIsService allows us to dfferentiate between service containers and other container
1555+
// WithIsService allows us to differentiate between service containers and other container
15561556
// within the container config
15571557
func WithIsService() CtrCreateOption {
15581558
return func(ctr *Container) error {

libpod/runtime.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -385,7 +385,7 @@ func makeRuntime(runtime *Runtime) (retErr error) {
385385
if err := unix.Access(runtime.storageConfig.RunRoot, unix.W_OK); err != nil {
386386
msg := fmt.Sprintf("RunRoot is pointing to a path (%s) which is not writable. Most likely podman will fail.", runtime.storageConfig.RunRoot)
387387
if errors.Is(err, os.ErrNotExist) {
388-
// if dir does not exists try to create it
388+
// if dir does not exist, try to create it
389389
if err := os.MkdirAll(runtime.storageConfig.RunRoot, 0700); err != nil {
390390
logrus.Warn(msg)
391391
}
@@ -704,8 +704,8 @@ var libimageEventsMap = map[libimage.EventType]events.Status{
704704
libimage.EventTypeImageUnmount: events.Unmount,
705705
}
706706

707-
// libimageEvents spawns a goroutine in the background which is listenting for
708-
// events on the libimage.Runtime. The gourtine will be cleaned up implicitly
707+
// libimageEvents spawns a goroutine which will listen for events on
708+
// the libimage.Runtime. The goroutine will be cleaned up implicitly
709709
// when the main() exists.
710710
func (r *Runtime) libimageEvents() {
711711
r.libimageEventsShutdown = make(chan bool)

libpod/runtime_ctr.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -477,7 +477,7 @@ func (r *Runtime) setupContainer(ctx context.Context, ctr *Container) (_ *Contai
477477
vol.Name = stringid.GenerateRandomID()
478478
isAnonymous = true
479479
} else {
480-
// Check if it exists already
480+
// Check if it already exists
481481
dbVol, err := r.state.Volume(vol.Name)
482482
if err == nil {
483483
ctrNamedVolumes = append(ctrNamedVolumes, dbVol)
@@ -503,7 +503,7 @@ func (r *Runtime) setupContainer(ctx context.Context, ctr *Container) (_ *Contai
503503

504504
needsChown := true
505505

506-
// If volume-opts are set parse and add driver opts.
506+
// If volume-opts are set, parse and add driver opts.
507507
if len(vol.Options) > 0 {
508508
isDriverOpts := false
509509
driverOpts := make(map[string]string)

pkg/api/handlers/compat/containers_archive.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ func handlePut(w http.ResponseWriter, r *http.Request, decoder *schema.Decoder,
133133
case errors.Is(err, define.ErrNoSuchCtr) || os.IsNotExist(err):
134134
// 404 is returned for an absent container and path. The
135135
// clients must deal with it accordingly.
136-
utils.Error(w, http.StatusNotFound, fmt.Errorf("the container doesn't exists: %w", err))
136+
utils.Error(w, http.StatusNotFound, fmt.Errorf("the container does not exist: %w", err))
137137
case strings.Contains(err.Error(), "copier: put: error creating file"):
138138
// Not the best test but need to break this out for compatibility
139139
// See vendor/github.com/containers/buildah/copier/copier.go:1585

pkg/api/handlers/compat/volumes.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ func CreateVolume(w http.ResponseWriter, r *http.Request) {
102102
err error
103103
)
104104
if len(input.Name) != 0 {
105-
// See if the volume exists already
105+
// See if the volume already exists
106106
existingVolume, err = runtime.GetVolume(input.Name)
107107
if err != nil && !errors.Is(err, define.ErrNoSuchVolume) {
108108
utils.InternalServerError(w, err)

pkg/specgen/generate/container.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@ func CompleteSpec(ctx context.Context, r *libpod.Runtime, s *specgen.SpecGenerat
173173
return nil, err
174174
}
175175

176-
// labels from the image that don't exist already
176+
// labels from the image that don't already exist
177177
if len(labels) > 0 && s.Labels == nil {
178178
s.Labels = make(map[string]string)
179179
}

test/apiv2/10-images.at

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -215,7 +215,7 @@ t POST "libpod/build?remote=https%3A%2F%2Fgithub.com%2Falpinelinux%2Fdocker-alpi
215215
# Build api response header must contain Content-type: application/json
216216
t POST "build?dockerfile=containerfile" $CONTAINERFILE_TAR application/json 200
217217
response_headers=$(cat "$WORKDIR/curl.headers.out")
218-
like "$response_headers" ".*application/json.*" "header does not contains application/json"
218+
like "$response_headers" ".*application/json.*" "header does not contain application/json"
219219

220220
# PR #12091: output from compat API must now include {"aux":{"ID":"sha..."}}
221221
t POST "build?dockerfile=containerfile" $CONTAINERFILE_TAR 200 \

0 commit comments

Comments
 (0)