MCPcopy
hub / github.com/micro-editor/micro / Join

Method Join

internal/config/plugin_installer.go:491–512  ·  view source on GitHub ↗
(other PluginDependencies)

Source from the content-addressed store, hash-verified

489}
490
491func (req PluginDependencies) Join(other PluginDependencies) PluginDependencies {
492 m := make(map[string]*PluginDependency)
493 for _, r := range req {
494 m[r.Name] = r
495 }
496 for _, o := range other {
497 cur, ok := m[o.Name]
498 if ok {
499 m[o.Name] = &PluginDependency{
500 o.Name,
501 o.Range.AND(cur.Range),
502 }
503 } else {
504 m[o.Name] = o
505 }
506 }
507 result := make(PluginDependencies, 0, len(m))
508 for _, v := range m {
509 result = append(result, v)
510 }
511 return result
512}
513
514// Resolve resolves dependencies between different plugins
515func (all PluginPackages) Resolve(selectedVersions PluginVersions, open PluginDependencies) (PluginVersions, error) {

Callers 15

InitBindingsFunction · 0.80
TryBindKeyFunction · 0.80
UnbindKeyFunction · 0.80
SaveAsCBMethod · 0.80
NameMethod · 0.80
OpenCmdMethod · 0.80
SetGlobalOptionNativeFunction · 0.80
RunCmdMethod · 0.80
ReplaceCmdMethod · 0.80
backupDirMethod · 0.80
SerializeMethod · 0.80
UnserializeMethod · 0.80

Calls

no outgoing calls

Tested by 2

checkFunction · 0.64
randomTextFunction · 0.64