From 1072084ff38251aae59bb77803ddf7087e5b3f84 Mon Sep 17 00:00:00 2001 From: Nick Ethier Date: Wed, 17 Jul 2019 10:27:54 -0400 Subject: [PATCH] Apply suggestions from code review Co-Authored-By: Mahmood Ali --- client/client.go | 2 +- client/cni_autofetch.go | 2 +- command/agent/config.go | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/client/client.go b/client/client.go index 49fe95644..cbe18ada6 100644 --- a/client/client.go +++ b/client/client.go @@ -571,7 +571,7 @@ func (c *Client) init() error { // Ensure the cnibin dir exists if we have one if c.config.AutoFetchCNIDir != "" { if err := os.MkdirAll(c.config.AutoFetchCNIDir, 0755); err != nil { - return fmt.Errorf("failed creating cnibin dir: %s", err) + return fmt.Errorf("failed to create directory for AutoFetchCNIDir: %s", err) } } else { // Otherwise make a temp directory to use. diff --git a/client/cni_autofetch.go b/client/cni_autofetch.go index 5a19ed5a8..4e887f372 100644 --- a/client/cni_autofetch.go +++ b/client/cni_autofetch.go @@ -47,5 +47,5 @@ func (g *CNIGetter) CNIPath(path string) string { if path == "" { return g.dst } - return strings.Join([]string{path, g.dst}, ":") + return path + ":" + g.dst } diff --git a/command/agent/config.go b/command/agent/config.go index 96d0fa4fa..3075c6f29 100644 --- a/command/agent/config.go +++ b/command/agent/config.go @@ -265,7 +265,7 @@ type ClientConfig struct { AutoFetchCNIPlugins bool `hcl:"auto_fetch_cni_plugins` // AutoFetchCNIPluginsURL - AutoFetchCNIPluginsURL string `hcl:"auto_fetch_cni_plugins_url` + AutoFetchCNIPluginsURL string `hcl:"auto_fetch_cni_plugins_url"` } // ACLConfig is configuration specific to the ACL system