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

Method AddRelation

opensca/model/spdx.go:73–79  ·  view source on GitHub ↗
(parentId, childId string)

Source from the content-addressed store, hash-verified

71}
72
73func (doc *SpdxDocument) AddRelation(parentId, childId string) {
74 doc.Relationships = append(doc.Relationships, Relationship{
75 SPDXElementID: "SPDXRef-" + parentId,
76 RelatedSPDXElement: "SPDXRef-" + childId,
77 RelationshipType: "DEPENDS_ON",
78 })
79}
80
81func (doc *SpdxDocument) WriteSpdx(w io.Writer) error {
82 tmpl, err := template.New("tagValue").Parse(spdxtpl)

Callers 1

spdxDocFunction · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected