Documentation ¶
Overview ¶
Package gomod extracts go.mod files.
Index ¶
- type Extractor
- func (e Extractor) Ecosystem(i *extractor.Inventory) string
- func (e Extractor) Extract(ctx context.Context, input *filesystem.ScanInput) ([]*extractor.Inventory, error)
- func (e Extractor) FileRequired(path string, fileInfo fs.FileInfo) bool
- func (e Extractor) Name() string
- func (e Extractor) Requirements() *plugin.Capabilities
- func (e Extractor) ToCPEs(i *extractor.Inventory) []string
- func (e Extractor) ToPURL(i *extractor.Inventory) *purl.PackageURL
- func (e Extractor) Version() int
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Extractor ¶
type Extractor struct{}
Extractor extracts go packages from a go.mod file, including the stdlib version by using the top level go version
The output is not sorted and will not be in a consistent order
func (Extractor) Ecosystem ¶
Ecosystem returns the OSV Ecosystem of the software extracted by this extractor.
func (Extractor) Extract ¶
func (e Extractor) Extract(ctx context.Context, input *filesystem.ScanInput) ([]*extractor.Inventory, error)
Extract extracts packages from a go.mod file passed through the scan input.
func (Extractor) FileRequired ¶
FileRequired returns true if the specified file matches go.mod files.
func (Extractor) Requirements ¶
func (e Extractor) Requirements() *plugin.Capabilities
Requirements of the extractor.
func (Extractor) ToCPEs ¶
ToCPEs is not applicable as this extractor does not infer CPEs from the Inventory.
Click to show internal directories.
Click to hide internal directories.