summaryrefslogtreecommitdiff
path: root/libpod/container_api.go
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2022-04-27 04:50:01 -0400
committerGitHub <noreply@github.com>2022-04-27 04:50:01 -0400
commit053b09660ffbe2df2104186c67e39be70764ff63 (patch)
treeb9d8d32e146eb1ca1a3385e61b24d276dabc1cf0 /libpod/container_api.go
parent5ac00a7287e4a9e6292f4a6ca5dfa9a02e5ca907 (diff)
parent4f8ece76fff31d31570af56e0ec4a4092e015b33 (diff)
downloadpodman-053b09660ffbe2df2104186c67e39be70764ff63.tar.gz
podman-053b09660ffbe2df2104186c67e39be70764ff63.tar.bz2
podman-053b09660ffbe2df2104186c67e39be70764ff63.zip
Merge pull request #13997 from Luap99/gocritic
enable gocritic linter
Diffstat (limited to 'libpod/container_api.go')
-rw-r--r--libpod/container_api.go3
1 files changed, 1 insertions, 2 deletions
diff --git a/libpod/container_api.go b/libpod/container_api.go
index fe41998c0..a6fcf709d 100644
--- a/libpod/container_api.go
+++ b/libpod/container_api.go
@@ -229,8 +229,7 @@ func (c *Container) Kill(signal uint) error {
// This function returns when the attach finishes. It does not hold the lock for
// the duration of its runtime, only using it at the beginning to verify state.
func (c *Container) Attach(streams *define.AttachStreams, keys string, resize <-chan define.TerminalSize) error {
- switch c.LogDriver() {
- case define.PassthroughLogging:
+ if c.LogDriver() == define.PassthroughLogging {
return errors.Wrapf(define.ErrNoLogs, "this container is using the 'passthrough' log driver, cannot attach")
}
if !c.batched {