From f091c8adeaba696b7c14658331b78cda77a97b57 Mon Sep 17 00:00:00 2001 From: Philippe ALEXANDRE Date: Tue, 27 Mar 2018 15:33:01 +0200 Subject: [PATCH] Remove the old lines of fmt.Sprintf in cmd/common.go --- cmd/common.go | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/cmd/common.go b/cmd/common.go index 3b316a2..cce49b3 100644 --- a/cmd/common.go +++ b/cmd/common.go @@ -18,7 +18,7 @@ import ( "fmt" "io/ioutil" "path/filepath" - + "github.com/aquasecurity/kube-bench/check" "github.com/golang/glog" "github.com/spf13/viper" @@ -48,12 +48,10 @@ func runChecks(t check.NodeType) { } ver := getKubeVersion() - // path := fmt.Sprintf("%s/%s", cfgDir, ver) path := filepath.Join(cfgDir, ver) - - // def := fmt.Sprintf("%s/%s", path, file) + def := filepath.Join(path, file) - + in, err := ioutil.ReadFile(def) if err != nil { exitWithError(fmt.Errorf("error opening %s controls file: %v", t, err))