unmatched returns the sorted scope keys declared in ri that were never marked (i.e. matched no policy attachment), so the caller can warn about likely typos. Nil-safe.
(ri *RuntimeInputs)
| 138 | // (i.e. matched no policy attachment), so the caller can warn about likely |
| 139 | // typos. Nil-safe. |
| 140 | func (t *scopeTracker) unmatched(ri *RuntimeInputs) []string { |
| 141 | if t == nil || ri == nil { |
| 142 | return nil |
| 143 | } |
| 144 | t.mu.Lock() |
| 145 | defer t.mu.Unlock() |
| 146 | |
| 147 | var out []string |
| 148 | for scope := range ri.Scoped { |
| 149 | if _, ok := t.seen[scope]; !ok { |
| 150 | out = append(out, scope) |
| 151 | } |
| 152 | } |
| 153 | slices.Sort(out) |
| 154 | return out |
| 155 | } |
no outgoing calls