fixed json syntax error

This commit is contained in:
Josh Baker 2016-05-23 13:40:08 -07:00
parent 3a6a33ea9a
commit afa15461de
1 changed files with 3 additions and 3 deletions

View File

@ -117,13 +117,13 @@ func FenceMatch(hookName string, sw *scanWriter, fence *liveFenceSwitches, detai
copy(resb, res)
sw.wr.Reset()
res = string(resb)
if strings.HasPrefix(res, ",") {
res = res[1:]
}
if sw.output == outputIDs {
res = `{"id":` + res + `}`
}
sw.mu.Unlock()
if strings.HasPrefix(res, ",") {
res = res[1:]
}
jskey := jsonString(details.key)