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 ¶
Split license string considering spaces as separator e.g. MPL 2.0 GPL2+ => {"MPL2.0", "GPL2+"}
func NormalizeLicense ¶
func NormalizeLicense(name string) expr.SimpleExpr
func SplitLicenses ¶
func TrimLicenseText ¶
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.