This commit is contained in:
Olivier Cervello
2023-02-03 17:49:28 +00:00
parent 7f3077a24e
commit 81aef1ecd7
2 changed files with 8 additions and 5 deletions
+8 -1
View File
@@ -297,7 +297,14 @@ func New(scan *Scan) *Results {
}
}
if scan.JSON == true {
output.GetJsonString(r, secrets, parameters, filetype, errors, infos)
jsonOutput, err := output.GetJsonString(
r, secrets, parameters, filetype, errors, infos,
)
if err == nil {
fmt.Println(string(jsonOutput))
} else {
log.Println(err)
}
}
})
-4
View File
@@ -28,7 +28,6 @@ package output
import (
"encoding/json"
"fmt"
"strconv"
"strings"
@@ -138,8 +137,5 @@ func GetJsonString(
return nil, err
}
// Output JSON string
fmt.Println(string(jsonOutput))
return jsonOutput, nil
}