summaryrefslogtreecommitdiffstats
path: root/ssllabs-scan.go
diff options
context:
space:
mode:
authorMatt Keller <matthew.keller@spatialkey.com>2014-11-17 07:26:27 -0800
committerMatt Keller <matthew.keller@spatialkey.com>2014-11-17 07:26:27 -0800
commit468f1c37fcfc54d71d3902ecb172124aa5a206a3 (patch)
tree988654ef15616fc6e6e468ff59ca516e89bc4eea /ssllabs-scan.go
parent189e8ea12969616a54bf755fcc657779878fb0e9 (diff)
downloadssllabs-scan-468f1c37fcfc54d71d3902ecb172124aa5a206a3.zip
ssllabs-scan-468f1c37fcfc54d71d3902ecb172124aa5a206a3.tar.gz
ssllabs-scan-468f1c37fcfc54d71d3902ecb172124aa5a206a3.tar.bz2
This fixes ssllabs/ssllabs-scan#21 and pre-emptively fixes the next
error the user would have reported, as the result would not have been a valid JSON array.
Diffstat (limited to 'ssllabs-scan.go')
-rw-r--r--ssllabs-scan.go12
1 files changed, 11 insertions, 1 deletions
diff --git a/ssllabs-scan.go b/ssllabs-scan.go
index 66ef586..b4fc9e4 100644
--- a/ssllabs-scan.go
+++ b/ssllabs-scan.go
@@ -816,7 +816,17 @@ func main() {
} else if *conf_rawoutput {
// Raw (non-Go-mangled) JSON output
- fmt.Println(manager.results.responses)
+
+ fmt.Println("[")
+ for i := range manager.results.responses {
+ results := manager.results.responses[i]
+
+ if i>0 {
+ fmt.Println(",")
+ }
+ fmt.Println(results)
+ }
+ fmt.Println("]")
} else {
// Regular JSON output
results, err = json.Marshal(manager.results.reports)