github.com/lineaje-labs/syft@v0.98.1-0.20231227153149-9e393f60ff1b/syft/pkg/cataloger/dotnet/cataloger.go (about)

     1  /*
     2  Package dotnet provides a concrete Cataloger implementation relating to packages within the C#/.NET language/runtime ecosystem.
     3  */
     4  package dotnet
     5  
     6  import (
     7  	"github.com/anchore/syft/syft/pkg"
     8  	"github.com/anchore/syft/syft/pkg/cataloger/generic"
     9  )
    10  
    11  // NewDotnetDepsCataloger returns a new Dotnet cataloger object base on deps json files.
    12  func NewDotnetDepsCataloger() pkg.Cataloger {
    13  	return generic.NewCataloger("dotnet-deps-cataloger").
    14  		WithParserByGlobs(parseDotnetDeps, "**/*.deps.json")
    15  }
    16  
    17  // NewDotnetPortableExecutableCataloger returns a new Dotnet cataloger object base on portable executable files.
    18  func NewDotnetPortableExecutableCataloger() pkg.Cataloger {
    19  	return generic.NewCataloger("dotnet-portable-executable-cataloger").
    20  		WithParserByGlobs(parseDotnetPortableExecutable, "**/*.dll", "**/*.exe")
    21  }