MCPcopy Create free account
hub / github.com/GuyARoss/orbit / FindBundleKey

Method FindBundleKey

internal/srcpack/component.go:258–266  ·  view source on GitHub ↗

Find finds and returns the the first component with provided bundle key

(key string)

Source from the content-addressed store, hash-verified

256
257// Find finds and returns the the first component with provided bundle key
258func (m PackComponentFileMap) FindBundleKey(key string) PackComponent {
259 for _, c := range m {
260 if c.BundleKey() == key {
261 return c
262 }
263 }
264
265 return nil
266}
267
268func (m PackComponentFileMap) Set(component PackComponent) {
269 m[parsePath(component.OriginalFilePath())] = component

Callers 2

TestFindBundleKeyFunction · 0.95

Calls 1

BundleKeyMethod · 0.65

Tested by 1

TestFindBundleKeyFunction · 0.76