Apply suggestions from code review

Co-Authored-By: Mahmood Ali <mahmood@hashicorp.com>
This commit is contained in:
Nick Ethier
2019-07-17 10:27:54 -04:00
parent 54ce4d1f7e
commit 1072084ff3
3 changed files with 3 additions and 3 deletions

View File

@@ -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.

View File

@@ -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
}

View File

@@ -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