(ids []string)
| 37 | } |
| 38 | |
| 39 | func resolve(ids []string) ([]components.Plugin, []string) { |
| 40 | seen := make(map[string]struct{}) |
| 41 | plugins := make([]components.Plugin, 0, len(ids)) |
| 42 | var missing []string |
| 43 | |
| 44 | for _, id := range ids { |
| 45 | if id == "" { |
| 46 | continue |
| 47 | } |
| 48 | |
| 49 | if canonical, ok := legacyAliases[id]; ok { |
| 50 | id = canonical |
| 51 | } |
| 52 | |
| 53 | if _, exists := seen[id]; exists { |
| 54 | continue |
| 55 | } |
| 56 | |
| 57 | factory, ok := registry[id] |
| 58 | if !ok { |
| 59 | missing = append(missing, id) |
| 60 | continue |
| 61 | } |
| 62 | |
| 63 | plugins = append(plugins, factory()) |
| 64 | seen[id] = struct{}{} |
| 65 | } |
| 66 | |
| 67 | return plugins, missing |
| 68 | } |
| 69 | |
| 70 | // AvailableIDs returns the list of registered plugin identifiers. |
| 71 | func AvailableIDs() []string { |
no test coverage detected