diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2022-09-12 16:52:08 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-09-12 16:52:08 +0200 |
commit | 5abc08df252037e2984a2b532f17ba78fdd876d4 (patch) | |
tree | 6d370a390a712c27f3e6c34c5e9646c29f1184a6 /libpod/container.go | |
parent | 3b9e31c9bb0c36f30ed524ecef7accc1e1e76966 (diff) | |
parent | 2c63b8439bbdc09203ea394ad2cf9352830861f0 (diff) | |
download | podman-5abc08df252037e2984a2b532f17ba78fdd876d4.tar.gz podman-5abc08df252037e2984a2b532f17ba78fdd876d4.tar.bz2 podman-5abc08df252037e2984a2b532f17ba78fdd876d4.zip |
Merge pull request #15511 from rhatdan/codespell
Fix stutters
Diffstat (limited to 'libpod/container.go')
-rw-r--r-- | libpod/container.go | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/libpod/container.go b/libpod/container.go index 1891b124f..bdedafd22 100644 --- a/libpod/container.go +++ b/libpod/container.go @@ -353,14 +353,14 @@ func (c *Container) specFromState() (*spec.Spec, error) { returnSpec = new(spec.Spec) content, err := ioutil.ReadAll(f) if err != nil { - return nil, fmt.Errorf("error reading container config: %w", err) + return nil, fmt.Errorf("reading container config: %w", err) } if err := json.Unmarshal(content, &returnSpec); err != nil { - return nil, fmt.Errorf("error unmarshalling container config: %w", err) + return nil, fmt.Errorf("unmarshalling container config: %w", err) } } else if !os.IsNotExist(err) { // ignore when the file does not exist - return nil, fmt.Errorf("error opening container config: %w", err) + return nil, fmt.Errorf("opening container config: %w", err) } return returnSpec, nil @@ -703,7 +703,7 @@ func (c *Container) Mounted() (bool, string, error) { c.lock.Lock() defer c.lock.Unlock() if err := c.syncContainer(); err != nil { - return false, "", fmt.Errorf("error updating container %s state: %w", c.ID(), err) + return false, "", fmt.Errorf("updating container %s state: %w", c.ID(), err) } } // We cannot directly return c.state.Mountpoint as it is not guaranteed @@ -733,7 +733,7 @@ func (c *Container) StartedTime() (time.Time, error) { c.lock.Lock() defer c.lock.Unlock() if err := c.syncContainer(); err != nil { - return time.Time{}, fmt.Errorf("error updating container %s state: %w", c.ID(), err) + return time.Time{}, fmt.Errorf("updating container %s state: %w", c.ID(), err) } } return c.state.StartedTime, nil @@ -745,7 +745,7 @@ func (c *Container) FinishedTime() (time.Time, error) { c.lock.Lock() defer c.lock.Unlock() if err := c.syncContainer(); err != nil { - return time.Time{}, fmt.Errorf("error updating container %s state: %w", c.ID(), err) + return time.Time{}, fmt.Errorf("updating container %s state: %w", c.ID(), err) } } return c.state.FinishedTime, nil @@ -760,7 +760,7 @@ func (c *Container) ExitCode() (int32, bool, error) { c.lock.Lock() defer c.lock.Unlock() if err := c.syncContainer(); err != nil { - return 0, false, fmt.Errorf("error updating container %s state: %w", c.ID(), err) + return 0, false, fmt.Errorf("updating container %s state: %w", c.ID(), err) } } return c.state.ExitCode, c.state.Exited, nil @@ -772,7 +772,7 @@ func (c *Container) OOMKilled() (bool, error) { c.lock.Lock() defer c.lock.Unlock() if err := c.syncContainer(); err != nil { - return false, fmt.Errorf("error updating container %s state: %w", c.ID(), err) + return false, fmt.Errorf("updating container %s state: %w", c.ID(), err) } } return c.state.OOMKilled, nil @@ -859,7 +859,7 @@ func (c *Container) ExecSession(id string) (*ExecSession, error) { returnSession := new(ExecSession) if err := JSONDeepCopy(session, returnSession); err != nil { - return nil, fmt.Errorf("error copying contents of container %s exec session %s: %w", c.ID(), session.ID(), err) + return nil, fmt.Errorf("copying contents of container %s exec session %s: %w", c.ID(), session.ID(), err) } return returnSession, nil @@ -919,7 +919,7 @@ func (c *Container) NamespacePath(linuxNS LinuxNS) (string, error) { //nolint:in c.lock.Lock() defer c.lock.Unlock() if err := c.syncContainer(); err != nil { - return "", fmt.Errorf("error updating container %s state: %w", c.ID(), err) + return "", fmt.Errorf("updating container %s state: %w", c.ID(), err) } } @@ -957,7 +957,7 @@ func (c *Container) CgroupPath() (string, error) { c.lock.Lock() defer c.lock.Unlock() if err := c.syncContainer(); err != nil { - return "", fmt.Errorf("error updating container %s state: %w", c.ID(), err) + return "", fmt.Errorf("updating container %s state: %w", c.ID(), err) } } return c.cGroupPath() @@ -1057,7 +1057,7 @@ func (c *Container) RootFsSize() (int64, error) { c.lock.Lock() defer c.lock.Unlock() if err := c.syncContainer(); err != nil { - return -1, fmt.Errorf("error updating container %s state: %w", c.ID(), err) + return -1, fmt.Errorf("updating container %s state: %w", c.ID(), err) } } return c.rootFsSize() @@ -1069,7 +1069,7 @@ func (c *Container) RWSize() (int64, error) { c.lock.Lock() defer c.lock.Unlock() if err := c.syncContainer(); err != nil { - return -1, fmt.Errorf("error updating container %s state: %w", c.ID(), err) + return -1, fmt.Errorf("updating container %s state: %w", c.ID(), err) } } return c.rwSize() @@ -1157,7 +1157,7 @@ func (c *Container) ContainerState() (*ContainerState, error) { } returnConfig := new(ContainerState) if err := JSONDeepCopy(c.state, returnConfig); err != nil { - return nil, fmt.Errorf("error copying container %s state: %w", c.ID(), err) + return nil, fmt.Errorf("copying container %s state: %w", c.ID(), err) } return c.state, nil } |