Skip to content

Commit

Permalink
Move to latest spdx.
Browse files Browse the repository at this point in the history
Signed-off-by: Jeff Mendoza <jlm@jlm.name>
  • Loading branch information
jeffmendoza committed Jun 6, 2023
1 parent 17532b9 commit def0700
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions pkg/handler/processor/guesser/type_spdx.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,13 @@ package guesser

import (
"github.com/guacsec/guac/pkg/handler/processor"
"github.com/spdx/tools-golang/spdx/v2/v2_2"
"github.com/spdx/tools-golang/spdx"
)

type spdxTypeGuesser struct{}

func (_ *spdxTypeGuesser) GuessDocumentType(blob []byte, format processor.FormatType) processor.DocumentType {
spdxDoc := &v2_2.Document{}
spdxDoc := &spdx.Document{}
switch format {
case processor.FormatJSON:
if err := spdxDoc.UnmarshalJSON(blob); err == nil {
Expand Down
4 changes: 2 additions & 2 deletions pkg/handler/processor/spdx/spdx.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import (
"fmt"

"github.com/guacsec/guac/pkg/handler/processor"
"github.com/spdx/tools-golang/spdx/v2/v2_2"
"github.com/spdx/tools-golang/spdx"
)

// SPDXProcessor processes SPDX documents.
Expand All @@ -34,7 +34,7 @@ func (p *SPDXProcessor) ValidateSchema(d *processor.Document) error {

switch d.Format {
case processor.FormatJSON:
doc := &v2_2.Document{}
doc := &spdx.Document{}
return doc.UnmarshalJSON(d.Blob)
}

Expand Down

0 comments on commit def0700

Please sign in to comment.