Documentation
¶
Index ¶
Constants ¶
View Source
const ( DefaultCoverageThreshold = 75 // determined by experimentation DefaultIncludeLicenseContent = false )
View Source
const (
UnknownLicensePrefix = unknownLicenseType + "_"
)
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Scanner ¶
type Scanner interface {
IdentifyLicenseIDs(context.Context, io.Reader) ([]string, []byte, error)
FileSearch(context.Context, file.LocationReadCloser) ([]file.License, error)
PkgSearch(context.Context, file.LocationReadCloser) ([]pkg.License, error)
}
func NewDefaultScanner ¶
NewDefaultScanner returns a scanner that uses a new instance of the default licensecheck package scanner.
func NewScanner ¶
func NewScanner(c *ScannerConfig) (Scanner, error)
NewScanner generates a license Scanner with the given ScannerConfig if config is nil NewDefaultScanner is used
type ScannerConfig ¶
type ScannerConfig struct {
CoverageThreshold float64
IncludeLicenseContent bool
Scanner func([]byte) licensecheck.Coverage
}
Click to show internal directories.
Click to hide internal directories.