mirror of
https://github.com/coredns/coredns.git
synced 2025-11-02 10:13:14 -05:00
Upgrade antonmedv/expr to expr-lang/expr (#6814)
* Upgrade antonmedv/expr to expr-lang/expr The project has moved. This also upgrades from 1.15.5 to 1.16.9. The expr project lacks a changelog but tests pass and the changes don't seem to change it much - but there were a lot of changes. Signed-off-by: Kevin Lyda <kevin@lyda.ie> * Upgrade build image In reviewing the build results I see the old build image was deprecated so upgrading to something newer. Signed-off-by: Kevin Lyda <kevin@lyda.ie> --------- Signed-off-by: Kevin Lyda <kevin@lyda.ie>
This commit is contained in:
@@ -93,13 +93,13 @@ Note that the regex pattern is enclosed in single quotes, and backslashes are es
|
||||
|
||||
## Expressions
|
||||
|
||||
To evaluate expressions, *view* uses the antonmedv/expr package ( https://github.com/antonmedv/expr ).
|
||||
To evaluate expressions, *view* uses the expr-lang/expr package ( https://github.com/expr-lang/expr ).
|
||||
For example, an expression could look like:
|
||||
`(type() == 'A' && name() == 'example.com.') || client_ip() == '1.2.3.4'`.
|
||||
|
||||
All expressions should be written to evaluate to a boolean value.
|
||||
|
||||
See https://github.com/antonmedv/expr/blob/master/docs/Language-Definition.md as a detailed reference for valid syntax.
|
||||
See https://github.com/expr-lang/expr/blob/master/docs/Language-Definition.md as a detailed reference for valid syntax.
|
||||
|
||||
### Available Expression Functions
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@ import (
|
||||
"github.com/coredns/coredns/plugin"
|
||||
"github.com/coredns/coredns/plugin/pkg/expression"
|
||||
|
||||
"github.com/antonmedv/expr"
|
||||
"github.com/expr-lang/expr"
|
||||
)
|
||||
|
||||
func init() { plugin.Register("view", setup) }
|
||||
|
||||
@@ -7,8 +7,8 @@ import (
|
||||
"github.com/coredns/coredns/plugin/pkg/expression"
|
||||
"github.com/coredns/coredns/request"
|
||||
|
||||
"github.com/antonmedv/expr"
|
||||
"github.com/antonmedv/expr/vm"
|
||||
"github.com/expr-lang/expr"
|
||||
"github.com/expr-lang/expr/vm"
|
||||
"github.com/miekg/dns"
|
||||
)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user