// GetPresenter retrieves a Presenter that matches a CLI option
GetPresenter retrieves a Presenter that matches a CLI option
// GetPresenter retrieves a Presenter that matches a CLI option
func GetPresenter(presenterConfig Config, matches match.Matches, ignoredMatches []match.IgnoredMatch, packages []pkg.Package, context pkg.Context, metadataProvider vulnerability.MetadataProvider, appConfig interface{}, dbStatus interface{}) Presenter {
	switch presenterConfig.format {
	case jsonFormat:
		return json.NewPresenter(matches, ignoredMatches, packages, context, metadataProvider, appConfig, dbStatus)
	case tableFormat:
		return table.NewPresenter(matches, packages, metadataProvider)
	case cycloneDXFormat:
		return cyclonedx.NewPresenter(matches, packages, context.Source, metadataProvider)
	case embeddedVEXJSON:
		return cyclonedxvex.NewPresenter(matches, packages, context.Source, metadataProvider, true, cdx.BOMFileFormatJSON)
	case embeddedVEXXML:
		return cyclonedxvex.NewPresenter(matches, packages, context.Source, metadataProvider, true, cdx.BOMFileFormatXML)
	case sarifFormat:
		return sarif.NewPresenter(matches, packages, context.Source, metadataProvider)
	case templateFormat:
		return template.NewPresenter(matches, ignoredMatches, packages, context, metadataProvider, appConfig, dbStatus, presenterConfig.templateFilePath)
	default:
		return nil
	}
}
func GetPresenter ( presenterConfig Config , matches match . Matches , ignoredMatches [ ] match . IgnoredMatch , packages [ ] pkg . Package , context pkg . Context , metadataProvider vulnerability . MetadataProvider , appConfig interface { } , dbStatus interface { } ) Presenter { switch presenterConfig . format { case jsonFormat : return json . NewPresenter ( matches , ignoredMatches , packages , context , metadataProvider , appConfig , dbStatus ) case tableFormat : return table . NewPresenter ( matches , packages , metadataProvider ) case cycloneDXFormat : return cyclonedx . NewPresenter ( matches , packages , context . Source , metadataProvider ) case embeddedVEXJSON : return cyclonedxvex . NewPresenter ( matches , packages , context . Source , metadataProvider , true , cdx . BOMFileFormatJSON ) case embeddedVEXXML : return cyclonedxvex . NewPresenter ( matches , packages , context . Source , metadataProvider , true , cdx . BOMFileFormatXML ) case sarifFormat : return sarif . NewPresenter ( matches , packages , context . Source , metadataProvider ) case templateFormat : return template . NewPresenter ( matches , ignoredMatches , packages , context , metadataProvider , appConfig , dbStatus , presenterConfig . templateFilePath ) default : return nil } }
GetPresenter retrieves a Presenter that matches a CLI option
GetPresenter retrieves a Presenter that matches a CLI option