Skip to content

Commit

Permalink
Cease appending subpackages to document's packages array, fix typo in…
Browse files Browse the repository at this point in the history
… tag for struct

Signed-off-by: Amith K K <amithkumaran@gmail.com>
  • Loading branch information
amithkk committed Oct 3, 2021
1 parent 5096d75 commit b4a9852
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
1 change: 0 additions & 1 deletion pkg/format/format.go
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,6 @@ func (f *Format) annotateDocumentWithPackages(modules []models.Module, document
if err != nil {
return fmt.Errorf("failed to convert submodule %w", err)
}
document.Packages = append(document.Packages, subPkg)
document.Relationships = append(document.Relationships, models.Relationship{
SPDXElementID: pkg.SPDXID,
RelatedSPDXElement: subPkg.SPDXID,
Expand Down
2 changes: 1 addition & 1 deletion pkg/models/spdx.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ type Document struct {
DocumentNamespace string `json:"namespace,omitempty"`
CreationInfo CreationInfo `json:"creationInfo,omitempty"`
Packages []Package `json:"packages,omitempty"`
Relationships []Relationship `json:"relatioships,omitempty"`
Relationships []Relationship `json:"relationships,omitempty"`
ExtractedLicensingInfos []ExtractedLicensingInfo `json:"hasExtractedLicensingInfos,omitempty"`
}

Expand Down

0 comments on commit b4a9852

Please sign in to comment.