mirror of
https://github.com/aquasecurity/trivy.git
synced 2026-02-16 05:33:46 +08:00
refactor: better integration of the parser into Trivy (#6183)
Signed-off-by: knqyf263 <knqyf263@gmail.com>
This commit is contained in:
@@ -7,8 +7,8 @@ import (
|
||||
"github.com/liamg/jfather"
|
||||
"golang.org/x/xerrors"
|
||||
|
||||
dio "github.com/aquasecurity/trivy/pkg/dependency/parser/io"
|
||||
"github.com/aquasecurity/trivy/pkg/dependency/parser/types"
|
||||
xio "github.com/aquasecurity/trivy/pkg/x/io"
|
||||
)
|
||||
|
||||
type lockFile struct {
|
||||
@@ -26,7 +26,7 @@ func NewParser() types.Parser {
|
||||
return &Parser{}
|
||||
}
|
||||
|
||||
func (p *Parser) Parse(r dio.ReadSeekerAt) ([]types.Library, []types.Dependency, error) {
|
||||
func (p *Parser) Parse(r xio.ReadSeekerAt) ([]types.Library, []types.Dependency, error) {
|
||||
var lockFile lockFile
|
||||
input, err := io.ReadAll(r)
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user