mirror of
https://github.com/anchore/syft.git
synced 2026-11-01 23:16:30 +01:00
* add query by MIME type to source.FileResolver Signed-off-by: Alex Goodman <alex.goodman@anchore.com> * import stereoscope lib changes to find mime type - add bin cataloger - add bin parser - add mime type go utils - import new resolver Signed-off-by: Christopher Angelo Phillips <christopher.phillips@anchore.com> * add go std library code to unpack bin - keep them in their own (original) files - add note for "this code was copied from" - comment the lines the required changing Signed-off-by: Christopher Angelo Phillips <christopher.phillips@anchore.com> Co-authored-by: Alex Goodman <alex.goodman@anchore.com>
18 lines
443 B
Go
18 lines
443 B
Go
/*
|
|
Package golang provides a concrete Cataloger implementation for go.mod files.
|
|
*/
|
|
package golang
|
|
|
|
import (
|
|
"github.com/anchore/syft/syft/pkg/cataloger/common"
|
|
)
|
|
|
|
// NewGoModFileCataloger returns a new Go module cataloger object.
|
|
func NewGoModFileCataloger() *common.GenericCataloger {
|
|
globParsers := map[string]common.ParserFn{
|
|
"**/go.mod": parseGoMod,
|
|
}
|
|
|
|
return common.NewGenericCataloger(nil, globParsers, "go-mod-file-cataloger")
|
|
}
|