mirror of
https://github.com/TecharoHQ/anubis.git
synced 2026-04-20 23:26:40 +00:00
fix: replace checker.NewMapIterator with newMapIterator for HTTPHeaders and URLValues
Signed-off-by: Jason Cameron <jason.cameron@stanwith.me>
This commit is contained in:
committed by
Jason Cameron
parent
8e9b641280
commit
33ea6c714f
@@ -1,19 +1,15 @@
|
||||
package expressions
|
||||
|
||||
import (
|
||||
"errors"
|
||||
"net/url"
|
||||
"reflect"
|
||||
"strings"
|
||||
|
||||
"github.com/TecharoHQ/anubis/lib/policy/checker"
|
||||
"github.com/google/cel-go/common/types"
|
||||
"github.com/google/cel-go/common/types/ref"
|
||||
"github.com/google/cel-go/common/types/traits"
|
||||
)
|
||||
|
||||
var ErrNotImplemented = errors.New("expressions: not implemented")
|
||||
|
||||
// URLValues is a type wrapper to expose url.Values into CEL programs.
|
||||
type URLValues struct {
|
||||
url.Values
|
||||
@@ -71,7 +67,7 @@ func (u URLValues) Get(key ref.Val) ref.Val {
|
||||
}
|
||||
|
||||
func (u URLValues) Iterator() traits.Iterator {
|
||||
return checker.NewMapIterator(u.Values)
|
||||
return newMapIterator(u.Values)
|
||||
}
|
||||
|
||||
func (u URLValues) IsZeroValue() bool {
|
||||
|
||||
Reference in New Issue
Block a user