mirror of
https://github.com/aquasecurity/kube-bench.git
synced 2024-11-22 16:18:07 +00:00
Remove the old lines of fmt.Sprintf in cmd/common.go
This commit is contained in:
parent
d6c16f7563
commit
f091c8adea
@ -18,7 +18,7 @@ import (
|
|||||||
"fmt"
|
"fmt"
|
||||||
"io/ioutil"
|
"io/ioutil"
|
||||||
"path/filepath"
|
"path/filepath"
|
||||||
|
|
||||||
"github.com/aquasecurity/kube-bench/check"
|
"github.com/aquasecurity/kube-bench/check"
|
||||||
"github.com/golang/glog"
|
"github.com/golang/glog"
|
||||||
"github.com/spf13/viper"
|
"github.com/spf13/viper"
|
||||||
@ -48,12 +48,10 @@ func runChecks(t check.NodeType) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
ver := getKubeVersion()
|
ver := getKubeVersion()
|
||||||
// path := fmt.Sprintf("%s/%s", cfgDir, ver)
|
|
||||||
path := filepath.Join(cfgDir, ver)
|
path := filepath.Join(cfgDir, ver)
|
||||||
|
|
||||||
// def := fmt.Sprintf("%s/%s", path, file)
|
|
||||||
def := filepath.Join(path, file)
|
def := filepath.Join(path, file)
|
||||||
|
|
||||||
in, err := ioutil.ReadFile(def)
|
in, err := ioutil.ReadFile(def)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
exitWithError(fmt.Errorf("error opening %s controls file: %v", t, err))
|
exitWithError(fmt.Errorf("error opening %s controls file: %v", t, err))
|
||||||
|
Loading…
Reference in New Issue
Block a user