Fix linter warnings, including a bit of refactoring.

Signed-off-by: Matt Moyer <moyerm@vmware.com>
This commit is contained in:
Matt Moyer
2021-03-09 15:16:46 -06:00
parent 0abe10e6b2
commit 0cb1538b39
2 changed files with 36 additions and 29 deletions

View File

@@ -405,7 +405,6 @@ func TestImpersonationProxy(t *testing.T) {
// func to create kubectl commands with a kubeconfig
kubectlCommand := func(timeout context.Context, args ...string) (*exec.Cmd, *bytes.Buffer, *bytes.Buffer) {
allArgs := append([]string{"--kubeconfig", kubeconfigPath}, args...)
//nolint:gosec // we are not performing malicious argument injection against ourselves
kubectlCmd := exec.CommandContext(timeout, "kubectl", allArgs...)