(parentId, childId string)
| 71 | } |
| 72 | |
| 73 | func (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 | |
| 81 | func (doc *SpdxDocument) WriteSpdx(w io.Writer) error { |
| 82 | tmpl, err := template.New("tagValue").Parse(spdxtpl) |