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

Function NewSpdxDocument

opensca/model/spdx.go:47–55  ·  view source on GitHub ↗
(name string)

Source from the content-addressed store, hash-verified

45}
46
47func 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
57func (doc *SpdxDocument) AddPackage(id, vendor, name, version string, language Language, lics []string) {
58 purlRef := ExternalRef{

Callers 1

spdxDocFunction · 0.92

Calls

no outgoing calls

Tested by

no test coverage detected