| 75 | } |
| 76 | |
| 77 | func NewBomSWDocument(name, creator string) *BomSWDocument { |
| 78 | version := "1.0.0" |
| 79 | timestamp := time.Now().Format("2006-01-02T15:04:05MST") |
| 80 | return &BomSWDocument{ |
| 81 | Basic: swBasicInfo{ |
| 82 | DocumentName: name, |
| 83 | DocumentVersion: version, |
| 84 | DocumentTime: timestamp, |
| 85 | SbomFormat: "BOM-SW 1.0", |
| 86 | ToolInfo: creator, |
| 87 | SbomAuthor: "", |
| 88 | SbomAuthorComments: "", |
| 89 | SbomComments: "", |
| 90 | SbomType: "analyzed", |
| 91 | }, |
| 92 | Software: swSoftwareCompositionInfo{ |
| 93 | Dependencies: []swDependencies{}, |
| 94 | }, |
| 95 | } |
| 96 | } |
| 97 | |
| 98 | func (doc *BomSWDocument) AppendComponents(fn func(*BomSWComponent)) { |
| 99 | c := BomSWComponent{ |