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

Directly convert buffer to string (#492)

Using `buf.String()` instead of `fmt.Sprintf` is simpler
This commit is contained in:
Sebastian Ehmann 2019-11-06 02:07:41 +01:00 committed by Roberto Rojas
parent d7b5422e8a
commit b9be7daa4a

View File

@ -239,7 +239,7 @@ func executeJSONPath(path string, jsonInterface interface{}) (string, error) {
if err != nil {
return "", err
}
jsonpathResult := fmt.Sprintf("%s", buf)
jsonpathResult := buf.String()
return jsonpathResult, nil
}