Documentation ¶
Index ¶
- Variables
- func CreateLicenseExpression(licenses []string) string
- func EnsureSingleLicense(name string) string
- func GetLicenseByZipFile(filePath string) []string
- func GetLicensesFromCopyright(reader io.Reader) []string
- func ParseLicenseFromContent(content string) (value, other string, exists bool)
- func ParseLicenseFromDir(path string) (value []string, other string, exists bool)
- func ParseLicenseName(key string) (value, other string, exists bool)
- func ParseLicenseURL(key string) (value, other string, exists bool)
- func SplitLicense(key string, licenseList []string) []string
- func UniqueStrings(strs []string) []string
- type LicenseGuess
Constants ¶
This section is empty.
Variables ¶
View Source
var ( CDDL1AndGPL1 = "cddl+gpl_1_1" NONE_LICENSE = "NONE" NOASSERTION_LICENSE = "NOASSERTION" ConfidenceMinimumValue = float32(0.9) CopyrightFileName = "copyright" )
Functions ¶
func CreateLicenseExpression ¶
func EnsureSingleLicense ¶
func GetLicenseByZipFile ¶
func ParseLicenseFromContent ¶
ParseLicenseFromContent parses the license content and returns the license ID.
func ParseLicenseFromDir ¶
ParseLicenseFromDir parses the license from the directory and returns the license ID.
func ParseLicenseName ¶
ParseLicenseName parses the license name and returns the license ID.
func ParseLicenseURL ¶
ParseLicenseURL parses the license url and returns the license ID. licenseLowercaseKeys is a map of lowercase license names to license IDs.
func SplitLicense ¶
SplitLicense splits the license string and returns the license ID.
func UniqueStrings ¶
UniqueStrings returns the unique strings.
Types ¶
type LicenseGuess ¶
Click to show internal directories.
Click to hide internal directories.