Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetLicenseFromDetector ¶
GetLicenseFromDetector check license from detector
func GetPomCommentLicense ¶
GetPomCommentLicense read licenses which presented as a comment in the pom file
Types ¶
type DiscoveryFiler ¶
type DiscoveryFiler struct {
LicenseContent string
}
DiscoveryFiler license object
func (DiscoveryFiler) PathsAreAlwaysSlash ¶
func (df DiscoveryFiler) PathsAreAlwaysSlash() bool
PathsAreAlwaysSlash check if path has slash
type LicenseDiscover ¶
type LicenseDiscover struct {
// contains filtered or unexported fields
}
LicenseDiscover object
func NewLicenseMatcher ¶
func NewLicenseMatcher(licensesFolder string) (*LicenseDiscover, error)
NewLicenseMatcher read licenses db and instantiate the classifier
func (LicenseDiscover) MatchLicenseTxt ¶
func (ld LicenseDiscover) MatchLicenseTxt(licenseTxt string) []string
MatchLicenseTxt try to match license txt to known spdx license 1st try to match to license classifier and then to license detector
Click to show internal directories.
Click to hide internal directories.