diff options
author | Matthew Heon <matthew.heon@gmail.com> | 2018-02-27 15:36:36 -0500 |
---|---|---|
committer | Atomic Bot <atomic-devel@projectatomic.io> | 2018-03-01 21:17:51 +0000 |
commit | 83d7ae6506f7aaf1f7d543412a148b4bf4cd6657 (patch) | |
tree | 229b1f3b746541ce6c269e6fe73661795b6d675e /libpod/container_api.go | |
parent | 780baec1d9fc6f733d06fafddb53655784e2f6f1 (diff) | |
download | podman-83d7ae6506f7aaf1f7d543412a148b4bf4cd6657.tar.gz podman-83d7ae6506f7aaf1f7d543412a148b4bf4cd6657.tar.bz2 podman-83d7ae6506f7aaf1f7d543412a148b4bf4cd6657.zip |
Fix gofmt & golint
Signed-off-by: Matthew Heon <matthew.heon@gmail.com>
Closes: #412
Approved by: baude
Diffstat (limited to 'libpod/container_api.go')
-rw-r--r-- | libpod/container_api.go | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/libpod/container_api.go b/libpod/container_api.go index 17cd68972..e8185ae19 100644 --- a/libpod/container_api.go +++ b/libpod/container_api.go @@ -252,7 +252,7 @@ func (c *Container) Exec(tty, privileged bool, env, cmd []string, user string) e // This really ought to be a do-while, but Go doesn't have those... for found { found = false - for id, _ := range c.state.ExecSessions { + for id := range c.state.ExecSessions { if id == sessionID { found = true break @@ -277,7 +277,7 @@ func (c *Container) Exec(tty, privileged bool, env, cmd []string, user string) e // Wait until runc makes the pidfile // TODO: If runc errors before the PID file is created, we have to wait for timeout here - if err := WaitForFile(pidFile, pidWaitTimeout * time.Millisecond); err != nil { + if err := WaitForFile(pidFile, pidWaitTimeout*time.Millisecond); err != nil { logrus.Debugf("Timed out waiting for pidfile from runc for container %s exec", c.ID()) // Check if an error occurred in the process before we made a pidfile @@ -600,9 +600,8 @@ func (c *Container) Wait() (int32, error) { } if !stopped { return false, nil - } else { // nolint - return true, nil // nolint - } // nolint + } + return true, nil }, ) if err != nil { |