From f08b682ec8caab1a50aff1d37c10729e941d4721 Mon Sep 17 00:00:00 2001
From: xingweizheng <xingweizheng@huawei.com>
Date: Tue, 31 Aug 2021 11:52:29 +0800
Subject: [PATCH 17/20] fix golangci-lint warnings

---
 builder/dockerfile/run.go | 6 +++---
 cmd/cli/grpc_client.go    | 2 +-
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/builder/dockerfile/run.go b/builder/dockerfile/run.go
index 828fe676..d33573f9 100644
--- a/builder/dockerfile/run.go
+++ b/builder/dockerfile/run.go
@@ -97,9 +97,9 @@ func (c *cmdBuilder) setupRuntimeSpec(command []string) (*specs.Spec, error) {
 	// set specific runtime spec config
 	user := c.stage.docker.Config.User
 	if user != "" {
-		pair, err := util.GetChownOptions(user, c.stage.mountpoint)
-		if err != nil {
-			return nil, err
+		pair, gErr := util.GetChownOptions(user, c.stage.mountpoint)
+		if gErr != nil {
+			return nil, gErr
 		}
 		g.SetProcessUID(uint32(pair.UID))
 		g.SetProcessGID(uint32(pair.GID))
diff --git a/cmd/cli/grpc_client.go b/cmd/cli/grpc_client.go
index cab59503..44c00c09 100644
--- a/cmd/cli/grpc_client.go
+++ b/cmd/cli/grpc_client.go
@@ -82,7 +82,7 @@ func NewClient(ctx context.Context) (*GrpcClient, error) {
 	defer cancel()
 	connected, err := cli.HealthCheck(healthCtx)
 	if !connected || err != nil {
-		return nil, errors.Errorf( "Cannot connect to the isula-builder at %s. Is the isula-builder running?\nError: %v", constant.DefaultGRPCAddress, err)
+		return nil, errors.Errorf("Cannot connect to the isula-builder at %s. Is the isula-builder running?\nError: %v", constant.DefaultGRPCAddress, err)
 	}
 
 	return cli, nil
-- 
2.31.1

