diff options
Diffstat (limited to 'libpod')
-rw-r--r-- | libpod/container_internal.go | 10 | ||||
-rw-r--r-- | libpod/container_internal_linux.go | 7 | ||||
-rw-r--r-- | libpod/define/container_inspect.go | 6 | ||||
-rw-r--r-- | libpod/define/errors.go | 2 | ||||
-rw-r--r-- | libpod/define/volume_inspect.go | 2 | ||||
-rw-r--r-- | libpod/events/nullout.go | 2 | ||||
-rw-r--r-- | libpod/oci_conmon_linux.go | 4 | ||||
-rw-r--r-- | libpod/runtime_volume_linux.go | 4 |
8 files changed, 17 insertions, 20 deletions
diff --git a/libpod/container_internal.go b/libpod/container_internal.go index 6a98466c2..caf7f3849 100644 --- a/libpod/container_internal.go +++ b/libpod/container_internal.go @@ -130,7 +130,7 @@ func (c *Container) bundlePath() string { return c.config.StaticDir } -// ControlSocketPath returns the path to the containers control socket for things like tty +// ControlSocketPath returns the path to the container's control socket for things like tty // resizing func (c *Container) ControlSocketPath() string { return filepath.Join(c.bundlePath(), "ctl") @@ -513,8 +513,8 @@ func (c *Container) setupStorage(ctx context.Context) error { return fmt.Errorf("error creating container storage: %w", containerInfoErr) } - // only reconfig IDMappings if layer was mounted from storage - // if its a external overlay do not reset IDmappings + // Only reconfig IDMappings if layer was mounted from storage. + // If it's an external overlay do not reset IDmappings. if !c.config.RootfsOverlay { c.config.IDMappings.UIDMap = containerInfo.UIDMap c.config.IDMappings.GIDMap = containerInfo.GIDMap @@ -794,7 +794,7 @@ func (c *Container) save() error { } // Checks the container is in the right state, then initializes the container in preparation to start the container. -// If recursive is true, each of the containers dependencies will be started. +// If recursive is true, each of the container's dependencies will be started. // Otherwise, this function will return with error if there are dependencies of this container that aren't running. func (c *Container) prepareToStart(ctx context.Context, recursive bool) (retErr error) { // Container must be created or stopped to be started @@ -1255,7 +1255,7 @@ func (c *Container) stop(timeout uint) error { // If the container is running in a PID Namespace, then killing the // primary pid is enough to kill the container. If it is not running in // a pid namespace then the OCI Runtime needs to kill ALL processes in - // the containers cgroup in order to make sure the container is stopped. + // the container's cgroup in order to make sure the container is stopped. all := !c.hasNamespace(spec.PIDNamespace) // We can't use --all if Cgroups aren't present. // Rootless containers with Cgroups v1 and NoCgroups are both cases diff --git a/libpod/container_internal_linux.go b/libpod/container_internal_linux.go index 390e95258..46e525add 100644 --- a/libpod/container_internal_linux.go +++ b/libpod/container_internal_linux.go @@ -184,11 +184,8 @@ func (c *Container) prepare() error { func (c *Container) isWorkDirSymlink(resolvedPath string) bool { // We cannot create workdir since explicit --workdir is // set in config but workdir could also be a symlink. - // If its a symlink lets check if resolved link is present - // on the container or not. - - // If we can resolve symlink and resolved link is present on the container - // then return nil cause its a valid use-case. + // If it's a symlink, check if the resolved target is present in the container. + // If so, that's a valid use case: return nil. maxSymLinks := 0 for { diff --git a/libpod/define/container_inspect.go b/libpod/define/container_inspect.go index ccc4ae00f..e6a34ba61 100644 --- a/libpod/define/container_inspect.go +++ b/libpod/define/container_inspect.go @@ -506,8 +506,8 @@ type InspectContainerHostConfig struct { // CpuRealtimeRuntime is the length of time (in microseconds) allocated // for realtime tasks within every CpuRealtimePeriod. CpuRealtimeRuntime int64 `json:"CpuRealtimeRuntime"` - // CpusetCpus is the is the set of CPUs that the container will execute - // on. Formatted as `0-3` or `0,2`. Default (if unset) is all CPUs. + // CpusetCpus is the set of CPUs that the container will execute on. + // Formatted as `0-3` or `0,2`. Default (if unset) is all CPUs. CpusetCpus string `json:"CpusetCpus"` // CpusetMems is the set of memory nodes the container will use. // Formatted as `0-3` or `0,2`. Default (if unset) is all memory nodes. @@ -544,7 +544,7 @@ type InspectContainerHostConfig struct { OomKillDisable bool `json:"OomKillDisable"` // Init indicates whether the container has an init mounted into it. Init bool `json:"Init,omitempty"` - // PidsLimit is the maximum number of PIDs what may be created within + // PidsLimit is the maximum number of PIDs that may be created within // the container. 0, the default, indicates no limit. PidsLimit int64 `json:"PidsLimit"` // Ulimits is a set of ulimits that will be set within the container. diff --git a/libpod/define/errors.go b/libpod/define/errors.go index b858e1989..fd27e89de 100644 --- a/libpod/define/errors.go +++ b/libpod/define/errors.go @@ -205,7 +205,7 @@ var ( // Useful for potentially long running tasks. ErrCanceled = errors.New("cancelled by user") - // ErrConmonVersionFormat is used when the expected versio-format of conmon + // ErrConmonVersionFormat is used when the expected version format of conmon // has changed. ErrConmonVersionFormat = "conmon version changed format" ) diff --git a/libpod/define/volume_inspect.go b/libpod/define/volume_inspect.go index f731a8735..9279812da 100644 --- a/libpod/define/volume_inspect.go +++ b/libpod/define/volume_inspect.go @@ -45,7 +45,7 @@ type InspectVolumeData struct { // GID is the GID that the volume was created with. GID int `json:"GID,omitempty"` // Anonymous indicates that the volume was created as an anonymous - // volume for a specific container, and will be be removed when any + // volume for a specific container, and will be removed when any // container using it is removed. Anonymous bool `json:"Anonymous,omitempty"` // MountCount is the number of times this volume has been mounted. diff --git a/libpod/events/nullout.go b/libpod/events/nullout.go index 3eca9e8db..587a1b98b 100644 --- a/libpod/events/nullout.go +++ b/libpod/events/nullout.go @@ -19,7 +19,7 @@ func (e EventToNull) Read(ctx context.Context, options ReadOptions) error { } // NewNullEventer returns a new null eventer. You should only do this for -// the purposes on internal libpod testing. +// the purposes of internal libpod testing. func NewNullEventer() Eventer { return EventToNull{} } diff --git a/libpod/oci_conmon_linux.go b/libpod/oci_conmon_linux.go index 121e750f4..abc579519 100644 --- a/libpod/oci_conmon_linux.go +++ b/libpod/oci_conmon_linux.go @@ -1388,7 +1388,7 @@ func (r *ConmonOCIRuntime) sharedConmonArgs(ctr *Container, cuuid, bundlePath, p } func startCommand(cmd *exec.Cmd, ctr *Container) error { - // Make sure to unset the NOTIFY_SOCKET and reset if afterwards if needed. + // Make sure to unset the NOTIFY_SOCKET and reset it afterwards if needed. switch ctr.config.SdNotifyMode { case define.SdNotifyModeContainer, define.SdNotifyModeIgnore: if ctr.notifySocket != "" { @@ -1667,7 +1667,7 @@ func httpAttachNonTerminalCopy(container *net.UnixConn, http *bufio.ReadWriter, // multiplexing by Conmon). headerLen := uint32(numR - 1) // Practically speaking, we could make this buf[0] - 1, - // but we need to validate it anyways... + // but we need to validate it anyway. switch buf[0] { case AttachPipeStdin: headerBuf = makeHTTPAttachHeader(0, headerLen) diff --git a/libpod/runtime_volume_linux.go b/libpod/runtime_volume_linux.go index a751d75d2..d2fe9f2fb 100644 --- a/libpod/runtime_volume_linux.go +++ b/libpod/runtime_volume_linux.go @@ -31,7 +31,7 @@ func (r *Runtime) NewVolume(ctx context.Context, options ...VolumeCreateOption) // newVolume creates a new empty volume with the given options. // The createPluginVolume can be set to true to make it not create the volume in the volume plugin, -// this is required for the UpdateVolumePlugins() function. If you are not sure set this to false. +// this is required for the UpdateVolumePlugins() function. If you are not sure, set this to false. func (r *Runtime) newVolume(noCreatePluginVolume bool, options ...VolumeCreateOption) (_ *Volume, deferredErr error) { volume := newVolume(r) for _, option := range options { @@ -216,7 +216,7 @@ func (r *Runtime) UpdateVolumePlugins(ctx context.Context) *define.VolumeReload for _, vol := range libpodVolumes { if vol.UsesVolumeDriver() { if _, ok := allPluginVolumes[vol.Name()]; !ok { - // The volume is no longer in the plugin, lets remove it from the libpod db. + // The volume is no longer in the plugin. Let's remove it from the libpod db. if err := r.removeVolume(ctx, vol, false, nil, true); err != nil { if errors.Is(err, define.ErrVolumeBeingUsed) { // Volume is still used by at least one container. This is very bad, |