Fixed code formatting issues discovered by verify-gofmt

This commit is contained in:
Brian Pursley 2020-02-04 10:16:06 -05:00
parent 97185e9752
commit 2d21f16c38

View File

@ -101,31 +101,31 @@ func TestPluginPathsAreValid(t *testing.T) {
expectOut string expectOut string
}{ }{
{ {
name: "ensure no plugins found if no files begin with kubectl- prefix", name: "ensure no plugins found if no files begin with kubectl- prefix",
pluginPaths: []string{tempDir}, pluginPaths: []string{tempDir},
verifier: newFakePluginPathVerifier(), verifier: newFakePluginPathVerifier(),
pluginFile: func() (*os.File, error) { pluginFile: func() (*os.File, error) {
return ioutil.TempFile(tempDir, "notkubectl-") return ioutil.TempFile(tempDir, "notkubectl-")
}, },
expectErr: "error: unable to find any kubectl plugins in your PATH\n", expectErr: "error: unable to find any kubectl plugins in your PATH\n",
}, },
{ {
name: "ensure de-duplicated plugin-paths slice", name: "ensure de-duplicated plugin-paths slice",
pluginPaths: []string{tempDir, tempDir}, pluginPaths: []string{tempDir, tempDir},
verifier: newFakePluginPathVerifier(), verifier: newFakePluginPathVerifier(),
pluginFile: func() (*os.File, error) { pluginFile: func() (*os.File, error) {
return ioutil.TempFile(tempDir, "kubectl-") return ioutil.TempFile(tempDir, "kubectl-")
}, },
expectOut: "The following compatible plugins are available:", expectOut: "The following compatible plugins are available:",
}, },
{ {
name: "ensure no errors when empty string or blank path are specified", name: "ensure no errors when empty string or blank path are specified",
pluginPaths: []string{tempDir, "", " "}, pluginPaths: []string{tempDir, "", " "},
verifier: newFakePluginPathVerifier(), verifier: newFakePluginPathVerifier(),
pluginFile: func() (*os.File, error) { pluginFile: func() (*os.File, error) {
return ioutil.TempFile(tempDir, "kubectl-") return ioutil.TempFile(tempDir, "kubectl-")
}, },
expectOut: "The following compatible plugins are available:", expectOut: "The following compatible plugins are available:",
}, },
} }