mirror of
https://github.com/aquasecurity/kube-bench.git
synced 2025-01-03 04:10:55 +00:00
Directly convert buffer to string (#492)
Using `buf.String()` instead of `fmt.Sprintf` is simpler
This commit is contained in:
parent
d7b5422e8a
commit
b9be7daa4a
@ -239,7 +239,7 @@ func executeJSONPath(path string, jsonInterface interface{}) (string, error) {
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
return "", err
|
return "", err
|
||||||
}
|
}
|
||||||
jsonpathResult := fmt.Sprintf("%s", buf)
|
jsonpathResult := buf.String()
|
||||||
return jsonpathResult, nil
|
return jsonpathResult, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user