Documentation ¶
Index ¶
- Constants
- func Classify(filePath string, r io.Reader, confidenceLevel float64) (*types.LicenseFile, error)
- func LaxSplitLicenses(str string) []string
- func Normalize(name string) string
- func NormalizeLicense(name string) expr.SimpleExpr
- func SplitLicenses(str string) []string
- func TrimLicenseText(text string) string
- type Scanner
- type ScannerOption
Constants ¶
View Source
const ( LicenseTextPrefix = "text://" LicenseFilePrefix = "file://" CustomLicensePrefix = "CUSTOM License" )
Variables ¶
This section is empty.
Functions ¶
func LaxSplitLicenses ¶ added in v0.56.0
Split license string considering spaces as separator e.g. MPL 2.0 GPL2+ => {"MPL2.0", "GPL2+"}
func NormalizeLicense ¶ added in v0.56.0
func NormalizeLicense(name string) expr.SimpleExpr
func SplitLicenses ¶ added in v0.44.0
func TrimLicenseText ¶ added in v0.56.0
Types ¶
type Scanner ¶
type Scanner struct {
// contains filtered or unexported fields
}
func NewScanner ¶
func NewScanner(categories map[types.LicenseCategory][]string) Scanner
type ScannerOption ¶
type ScannerOption struct { IgnoredLicenses []string LicenseCategories map[types.LicenseCategory][]string }
Click to show internal directories.
Click to hide internal directories.