MCPcopy Create free account
hub / github.com/XmirrorSecurity/OpenSCA-cli / LoadOrStore

Method LoadOrStore

opensca/model/dep.go:354–367  ·  view source on GitHub ↗
(words ...string)

Source from the content-addressed store, hash-verified

352}
353
354func (s *DepGraphMap) LoadOrStore(words ...string) *DepGraph {
355
356 if s == nil || s.key == nil || s.store == nil {
357 return nil
358 }
359
360 key := s.key(words...)
361 dep, ok := s.m[key]
362 if !ok {
363 dep = s.store(words...)
364 s.m[key] = dep
365 }
366 return dep
367}

Callers 4

GoModGraphFunction · 0.95
parseSpdxDocFunction · 0.95
inheritModulesFunction · 0.95
getTypeInfoFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected