Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
varnishapi
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
uplex-varnish
varnishapi
Commits
ee9c9637
Commit
ee9c9637
authored
Sep 04, 2018
by
Geoff Simmons
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Query evaluation uses the new function to extract fields from payloads.
parent
d7f2fb35
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
4 deletions
+3
-4
query_eval.go
pkg/log/query_eval.go
+3
-4
No files found.
pkg/log/query_eval.go
View file @
ee9c9637
...
@@ -73,12 +73,11 @@ func (expr qExpr) testRecord(rec Record) bool {
...
@@ -73,12 +73,11 @@ func (expr qExpr) testRecord(rec Record) bool {
payload
=
bytes
.
TrimLeft
(
payload
,
"
\t\n\r
"
)
payload
=
bytes
.
TrimLeft
(
payload
,
"
\t\n\r
"
)
}
}
if
expr
.
lhs
.
field
>
0
{
if
expr
.
lhs
.
field
>
0
{
fld
:=
expr
.
lhs
.
field
min
,
max
,
ok
:=
fieldNDelims
(
payload
,
expr
.
lhs
.
field
-
1
)
flds
:=
bytes
.
Fields
(
payload
)
if
!
ok
{
if
fld
>
len
(
flds
)
{
return
false
return
false
}
}
payload
=
flds
[
fld
-
1
]
payload
=
payload
[
min
:
max
]
}
}
if
expr
.
rhs
.
rhsType
==
empty
{
if
expr
.
rhs
.
rhsType
==
empty
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment