Jq: ignore empty content
This commit is contained in:
parent
8a4108cf9b
commit
541541b595
1 changed files with 4 additions and 0 deletions
|
|
@ -184,6 +184,10 @@ func (p *Pipeline) Process(in []byte) ([]byte, error) {
|
|||
}
|
||||
|
||||
if p.jq != nil {
|
||||
// TODO make this optional
|
||||
if len(bytes.TrimSpace(b)) == 0 {
|
||||
return b, nil
|
||||
}
|
||||
v, err := jq.Query(p.jq, b)
|
||||
if err != nil {
|
||||
return b, backoff.Permanent(err)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue