Keep boolean when listed in json_string_fields (#6400)
This commit is contained in:
parent
acb6cd67be
commit
df288a0bb4
|
@ -169,13 +169,11 @@ func (p *Parser) switchFieldToTag(tags map[string]string, fields map[string]inte
|
||||||
//remove any additional string/bool values from fields
|
//remove any additional string/bool values from fields
|
||||||
for fk := range fields {
|
for fk := range fields {
|
||||||
switch fields[fk].(type) {
|
switch fields[fk].(type) {
|
||||||
case string:
|
case string, bool:
|
||||||
if p.stringFields != nil && p.stringFields.Match(fk) {
|
if p.stringFields != nil && p.stringFields.Match(fk) {
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
delete(fields, fk)
|
delete(fields, fk)
|
||||||
case bool:
|
|
||||||
delete(fields, fk)
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return tags, fields
|
return tags, fields
|
||||||
|
|
Loading…
Reference in New Issue