mirror of https://github.com/tidwall/tile38.git
fixed json syntax error
This commit is contained in:
parent
3a6a33ea9a
commit
afa15461de
|
@ -117,13 +117,13 @@ func FenceMatch(hookName string, sw *scanWriter, fence *liveFenceSwitches, detai
|
||||||
copy(resb, res)
|
copy(resb, res)
|
||||||
sw.wr.Reset()
|
sw.wr.Reset()
|
||||||
res = string(resb)
|
res = string(resb)
|
||||||
|
if strings.HasPrefix(res, ",") {
|
||||||
|
res = res[1:]
|
||||||
|
}
|
||||||
if sw.output == outputIDs {
|
if sw.output == outputIDs {
|
||||||
res = `{"id":` + res + `}`
|
res = `{"id":` + res + `}`
|
||||||
}
|
}
|
||||||
sw.mu.Unlock()
|
sw.mu.Unlock()
|
||||||
if strings.HasPrefix(res, ",") {
|
|
||||||
res = res[1:]
|
|
||||||
}
|
|
||||||
|
|
||||||
jskey := jsonString(details.key)
|
jskey := jsonString(details.key)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue