mirror of https://github.com/tidwall/tile38.git
redundant condition
This commit is contained in:
parent
ed300d7032
commit
033d0d333e
|
@ -192,14 +192,12 @@ func fenceMatch(hookName string, sw *scanWriter, fence *liveFenceSwitches, metas
|
|||
}
|
||||
}
|
||||
|
||||
msgs := make([][]byte, 0, 4)
|
||||
var msgs [][]byte
|
||||
if fence.detect == nil || fence.detect[detect] {
|
||||
if fence.detect == nil || fence.detect[detect] {
|
||||
if len(res) > 0 && res[0] == '{' {
|
||||
msgs = append(msgs, makemsg(details.command, group, detect, hookName, metas, details.key, details.timestamp, res[1:]))
|
||||
} else {
|
||||
msgs = append(msgs, res)
|
||||
}
|
||||
if len(res) > 0 && res[0] == '{' {
|
||||
msgs = append(msgs, makemsg(details.command, group, detect, hookName, metas, details.key, details.timestamp, res[1:]))
|
||||
} else {
|
||||
msgs = append(msgs, res)
|
||||
}
|
||||
}
|
||||
switch detect {
|
||||
|
|
Loading…
Reference in New Issue