1
0
mirror of https://github.com/aquasecurity/kube-bench.git synced 2024-12-22 14:48:07 +00:00

Log when there’s no substitution

This commit is contained in:
Liz Rice 2017-08-31 14:43:59 +01:00
parent f5550fd8bd
commit e4b905e360

View File

@ -243,6 +243,10 @@ func multiWordReplace(s string, subname string, sub string) string {
func makeSubstitutions(s string, ext string, m map[string]string) string {
for k, v := range m {
subst := "$" + k + ext
if v == "" {
glog.V(2).Info(fmt.Sprintf("No subsitution for '%s'\n", subst))
continue
}
glog.V(1).Info(fmt.Sprintf("Substituting %s with '%s'\n", subst, v))
s = multiWordReplace(s, subst, v)
}