[#XX] engine: Fix target considering order
DCO action / DCO (pull_request) Successful in 59s Details
Tests and linters / Tests (1.21) (pull_request) Successful in 1m10s Details
Tests and linters / Tests (1.20) (pull_request) Successful in 1m20s Details
Tests and linters / Staticcheck (pull_request) Successful in 1m31s Details
Tests and linters / Tests with -race (pull_request) Successful in 1m38s Details
Tests and linters / Lint (pull_request) Successful in 2m16s Details

* Namespace target rules should be considered first

Signed-off-by: Airat Arifullin <aarifullin@yadro.com>
aarifullin 2024-02-06 11:44:11 +03:00
parent 0a28f0a992
commit b30245dcff
1 changed files with 3 additions and 3 deletions

View File

@ -68,12 +68,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
}