mirror of
https://github.com/TecharoHQ/anubis.git
synced 2026-04-17 05:44:57 +00:00
fix: add cel iterator (#1465)
* fix: enable CEL iterators Signed-off-by: Jason Cameron <jason.cameron@stanwith.me> * test: add unit tests for CELChecker map iteration Signed-off-by: Jason Cameron <jason.cameron@stanwith.me> * fix: implement map iterators for HTTPHeaders and URLValues to resolve CEL internal errors Signed-off-by: Jason Cameron <jason.cameron@stanwith.me> * fix: replace checker.NewMapIterator with newMapIterator for HTTPHeaders and URLValues Signed-off-by: Jason Cameron <jason.cameron@stanwith.me> --------- Signed-off-by: Jason Cameron <jason.cameron@stanwith.me>
This commit is contained in:
@@ -66,7 +66,9 @@ func (h HTTPHeaders) Get(key ref.Val) ref.Val {
|
||||
return result
|
||||
}
|
||||
|
||||
func (h HTTPHeaders) Iterator() traits.Iterator { panic("TODO(Xe): implement me") }
|
||||
func (h HTTPHeaders) Iterator() traits.Iterator {
|
||||
return newMapIterator(h.Header)
|
||||
}
|
||||
|
||||
func (h HTTPHeaders) IsZeroValue() bool {
|
||||
return len(h.Header) == 0
|
||||
|
||||
Reference in New Issue
Block a user