MCPcopy Create free account
hub / github.com/devnullvoid/pvetui / resolve

Function resolve

internal/ui/plugins/loader.go:39–68  ·  view source on GitHub ↗
(ids []string)

Source from the content-addressed store, hash-verified

37}
38
39func 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.
71func AvailableIDs() []string {

Callers 3

EnabledFromConfigFunction · 0.85
_waitSockAsyncMethod · 0.85
_waitCredentialsAsyncMethod · 0.85

Calls 1

factoryFuncType · 0.85

Tested by

no test coverage detected