From 28ac2f82c690ac8f37c2980f2787572815439a50 Mon Sep 17 00:00:00 2001 From: Silvin Lubecki Date: Tue, 2 Apr 2019 13:16:13 +0200 Subject: [PATCH] cli/command/image/build_buildkit.go:450:56: parseSSH - result 1 (error) is always nil (unparam) Signed-off-by: Silvin Lubecki --- cli/command/image/build_buildkit.go | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/cli/command/image/build_buildkit.go b/cli/command/image/build_buildkit.go index b3b978c5634d..5c2de4630b3a 100644 --- a/cli/command/image/build_buildkit.go +++ b/cli/command/image/build_buildkit.go @@ -476,16 +476,13 @@ func parseSecret(value string) (*secretsprovider.FileSource, error) { func parseSSHSpecs(sl []string) (session.Attachable, error) { configs := make([]sshprovider.AgentConfig, 0, len(sl)) for _, v := range sl { - c, err := parseSSH(v) - if err != nil { - return nil, err - } + c := parseSSH(v) configs = append(configs, *c) } return sshprovider.NewSSHAgentProvider(configs) } -func parseSSH(value string) (*sshprovider.AgentConfig, error) { +func parseSSH(value string) *sshprovider.AgentConfig { parts := strings.SplitN(value, "=", 2) cfg := sshprovider.AgentConfig{ ID: parts[0], @@ -493,5 +490,5 @@ func parseSSH(value string) (*sshprovider.AgentConfig, error) { if len(parts) > 1 { cfg.Paths = strings.Split(parts[1], ",") } - return &cfg, nil + return &cfg }