From c15e0da6775d3c9146be613a12d7900f56e6ee16 Mon Sep 17 00:00:00 2001 From: Yusuf Kanchwala Date: Wed, 30 Sep 2020 17:17:37 +0530 Subject: [PATCH] making staticcheck happy --- pkg/cli/run.go | 5 +---- pkg/iac-providers/terraform/v12/module-download_test.go | 2 +- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/pkg/cli/run.go b/pkg/cli/run.go index bda6a982d..ecec08024 100644 --- a/pkg/cli/run.go +++ b/pkg/cli/run.go @@ -32,11 +32,8 @@ import ( func Run(iacType, iacVersion, cloudType, iacFilePath, iacDirPath, configFile, policyPath, format, remoteType, remoteURL string, configOnly bool) { - // download remote repository - var tempDir string - // temp dir to download the remote repo - tempDir = filepath.Join(os.TempDir(), utils.GenRandomString(6)) + tempDir := filepath.Join(os.TempDir(), utils.GenRandomString(6)) defer os.RemoveAll(tempDir) // download remote repository diff --git a/pkg/iac-providers/terraform/v12/module-download_test.go b/pkg/iac-providers/terraform/v12/module-download_test.go index 8ddda000e..82eacd614 100644 --- a/pkg/iac-providers/terraform/v12/module-download_test.go +++ b/pkg/iac-providers/terraform/v12/module-download_test.go @@ -56,7 +56,7 @@ func (m *MockDownloader) SubDirGlob(destDir, subDir string) (string, error) { } // ---------------------- unit tests -------------------------------- // -func TestisLocalSourceAddr(t *testing.T) { +func TestIsLocalSourceAddr(t *testing.T) { table := []struct { name string