MCPcopy Index your code
hub / github.com/helm/helm / detectDuplicates

Function detectDuplicates

internal/plugin/loader.go:273–289  ·  view source on GitHub ↗
(plugs []Plugin)

Source from the content-addressed store, hash-verified

271}
272
273func detectDuplicates(plugs []Plugin) error {
274 names := map[string]string{}
275
276 for _, plug := range plugs {
277 if oldpath, ok := names[plug.Metadata().Name]; ok {
278 return fmt.Errorf(
279 "two plugins claim the name %q at %q and %q",
280 plug.Metadata().Name,
281 oldpath,
282 plug.Dir(),
283 )
284 }
285 names[plug.Metadata().Name] = plug.Dir()
286 }
287
288 return nil
289}

Callers 2

TestDetectDuplicatesFunction · 0.85
LoadAllDirFunction · 0.85

Calls 2

MetadataMethod · 0.65
DirMethod · 0.65

Tested by 1

TestDetectDuplicatesFunction · 0.68

Used in the wild real call sites across dependent graphs

searching dependent graphs…