Documentation
¶
Index ¶
Constants ¶
View Source
const ( UnknownLicensePrefix = unknownLicenseType + "_" DefaultCoverageThreshold = 75 // determined by experimentation )
Variables ¶
This section is empty.
Functions ¶
func IsContextLicenseScannerSet ¶ added in v1.23.0
Types ¶
type Evidence ¶ added in v1.24.0
type Evidence struct {
ID string // License identifier. (See licenses/README.md.)
Type licensecheck.Type // The type of the license: BSD, MIT, etc.
Start int // Start offset of match in text; match is at text[Start:End].
End int // End offset of match in text.
IsURL bool // Whether match is a URL.
}
type Scanner ¶ added in v1.14.2
func ContextLicenseScanner ¶ added in v1.14.2
func NewDefaultScanner ¶ added in v1.14.2
NewDefaultScanner returns a scanner that uses a new instance of the default licensecheck package scanner.
func NewScanner ¶ added in v1.20.0
func NewScanner(c *ScannerConfig) (Scanner, error)
NewScanner generates a license Scanner with the given ScannerConfig if config is nil NewDefaultScanner is used
type ScannerConfig ¶ added in v1.20.0
type ScannerConfig struct {
CoverageThreshold float64
Scanner func([]byte) licensecheck.Coverage
}
Click to show internal directories.
Click to hide internal directories.