fix: errorlog future-vuls trivy-to-vuls (#1739)

Co-authored-by: 和田皓翔 <wadahiroka@192.168.0.6>
This commit is contained in:
hiroka-wada
2023-09-22 17:25:57 +09:00
committed by GitHub
parent f6509a5376
commit dea9ed7709
2 changed files with 2 additions and 3 deletions

View File

@@ -1,8 +1,8 @@
// Package parser ...
package parser
import (
"encoding/json"
"fmt"
v2 "github.com/future-architect/vuls/contrib/trivy/parser/v2"
"github.com/future-architect/vuls/models"
@@ -23,7 +23,6 @@ type Report struct {
func NewParser(vulnJSON []byte) (Parser, error) {
r := Report{}
if err := json.Unmarshal(vulnJSON, &r); err != nil {
fmt.Printf("%s", fmt.Sprintf("%s", vulnJSON))
return nil, xerrors.Errorf("Failed to parse JSON. Please use the latest version of trivy, trivy-to-vuls and future-vuls")
}
switch r.SchemaVersion {