[#49] engine: Fix target considering order

* Namespace target rules should be considered first

Signed-off-by: Airat Arifullin <aarifullin@yadro.com>
This commit is contained in:
aarifullin 2024-02-06 11:44:11 +03:00
parent 4a989d6bb7
commit 8354a074c4

View file

@ -70,12 +70,12 @@ func NewRequestTarget(namespace, container string) RequestTarget {
}
func (rt *RequestTarget) Targets() (targets []Target) {
if rt.Container != nil {
targets = append(targets, *rt.Container)
}
if rt.Namespace != nil {
targets = append(targets, *rt.Namespace)
}
if rt.Container != nil {
targets = append(targets, *rt.Container)
}
return
}