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
|
||||
for fk := range fields {
|
||||
switch fields[fk].(type) {
|
||||
case string:
|
||||
case string, bool:
|
||||
if p.stringFields != nil && p.stringFields.Match(fk) {
|
||||
continue
|
||||
}
|
||||
delete(fields, fk)
|
||||
case bool:
|
||||
delete(fields, fk)
|
||||
}
|
||||
}
|
||||
return tags, fields
|
||||
|
|
Loading…
Reference in New Issue