(name string)
| 45 | } |
| 46 | |
| 47 | func NewSpdxDocument(name string) *SpdxDocument { |
| 48 | return &SpdxDocument{ |
| 49 | SPDXVersion: "SPDX-2.2", |
| 50 | SPDXID: "SPDXRef-DOCUMENT", |
| 51 | Namespace: "ftp://spdx", |
| 52 | DocumentName: name, |
| 53 | CreationInfo: CreationInfo{Created: time.Now().Format("2006-01-02T15:04:05Z"), Creators: []string{"Tool: opensca-cli"}}, |
| 54 | } |
| 55 | } |
| 56 | |
| 57 | func (doc *SpdxDocument) AddPackage(id, vendor, name, version string, language Language, lics []string) { |
| 58 | purlRef := ExternalRef{ |