From b22b5eb3aa1cf9555ab97af3507940ec1b6a2328 Mon Sep 17 00:00:00 2001 From: Chris Bednarski Date: Tue, 17 Nov 2015 17:12:45 -0800 Subject: [PATCH] Inline err assignment --- client/driver/docker.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/client/driver/docker.go b/client/driver/docker.go index d92579e23..75e1278f6 100644 --- a/client/driver/docker.go +++ b/client/driver/docker.go @@ -440,8 +440,7 @@ func (d *DockerDriver) Open(ctx *ExecContext, handleID string) (DriverHandle, er // Split the handle pidBytes := []byte(strings.TrimPrefix(handleID, "DOCKER:")) pid := &dockerPID{} - err := json.Unmarshal(pidBytes, pid) - if err != nil { + if err := json.Unmarshal(pidBytes, pid); err != nil { return nil, fmt.Errorf("Failed to parse handle '%s': %v", handleID, err) } d.logger.Printf("[INFO] driver.docker: re-attaching to docker process: %s\n", handleID)