Versions in this module Expand all Collapse all v1 v1.0.2 Jul 13, 2023 v1.0.1 Jul 13, 2023 Changes in this version + const AFL11 + const AFL12 + const AFL20 + const AFL21 + const AFL30 + const AGPL10 + const AGPL30 + const APSL10 + const APSL11 + const APSL12 + const APSL20 + const Apache10 + const Apache11 + const Apache20 + const Artistic10 + const Artistic10Perl + const Artistic10cl8 + const Artistic20 + const BCL + const BSD2Clause + const BSD2ClauseFreeBSD + const BSD2ClauseNetBSD + const BSD3Clause + const BSD3ClauseAttribution + const BSD3ClauseClear + const BSD3ClauseLBNL + const BSD4Clause + const BSD4ClauseUC + const BSDProtection + const BSL10 + const Beerware + const CC010 + const CCBY10 + const CCBY20 + const CCBY25 + const CCBY30 + const CCBY40 + const CCBYNC10 + const CCBYNC20 + const CCBYNC25 + const CCBYNC30 + const CCBYNC40 + const CCBYNCND10 + const CCBYNCND20 + const CCBYNCND25 + const CCBYNCND30 + const CCBYNCND40 + const CCBYNCSA10 + const CCBYNCSA20 + const CCBYNCSA25 + const CCBYNCSA30 + const CCBYNCSA40 + const CCBYND10 + const CCBYND20 + const CCBYND25 + const CCBYND30 + const CCBYND40 + const CCBYSA10 + const CCBYSA20 + const CCBYSA25 + const CCBYSA30 + const CCBYSA40 + const CDDL10 + const CDDL11 + const CPAL10 + const CPL10 + const CommonsClause + const DefaultConfidenceThreshold + const EGenix + const EPL10 + const EPL20 + const EUPL10 + const EUPL11 + const FTL + const Facebook2Clause + const Facebook3Clause + const FacebookExamples + const ForbiddenLicenseArchive + const FreeImage + const GPL10 + const GPL20 + const GPL20withGCCexception + const GPL20withautoconfexception + const GPL20withbisonexception + const GPL20withclasspathexception + const GPL20withfontexception + const GPL30 + const GPL30withGCCexception + const GPL30withautoconfexception + const GUSTFont + const IPL10 + const ISC + const ImageMagick + const LGPL20 + const LGPL21 + const LGPL30 + const LGPLLR + const LPL10 + const LPL102 + const LPPL13c + const Libpng + const LicenseArchive + const Lil10 + const LinuxOpenIB + const MIT + const MPL10 + const MPL11 + const MPL20 + const MSPL + const NCSA + const NPL10 + const NPL11 + const OFL11 + const OSL10 + const OSL11 + const OSL20 + const OSL21 + const OSL30 + const OpenSSL + const OpenVision + const PHP30 + const PHP301 + const PIL + const PostgreSQL + const Python20 + const Python20complete + const QPL10 + const Ruby + const SGIB10 + const SGIB11 + const SGIB20 + const SISSL + const SISSL12 + const Sleepycat + const UPL10 + const UnicodeDFS2015 + const UnicodeDFS2016 + const UnicodeTOU + const Unlicense + const W3C + const W3C19980720 + const W3C20150513 + const WTFPL + const X11 + const Xnet + const ZPL11 + const ZPL20 + const ZPL21 + const Zend20 + const ZeroBSD + const Zlib + const ZlibAcknowledgement + var LicenseTypes = sets.NewStringSet("restricted", "reciprocal", "notice", "permissive", "unencumbered", ...) + var Normalizers = []stringclassifier.NormalizeFunc + var ReadLicenseDir = licenses.ReadLicenseDir + var ReadLicenseFile = licenses.ReadLicenseFile + func CopyrightHolder(contents string) string + func LicenseType(name string) string + func NormalizeEquivalentWords(s string) string + func NormalizePunctuation(s string) string + func RemoveNonWords(s string) string + func TrimExtraneousTrailingText(s string) string + type License struct + Threshold float64 + func New(threshold float64, options ...OptionFunc) (*License, error) + func NewWithForbiddenLicenses(threshold float64, options ...OptionFunc) (*License, error) + func (c *License) HasPublicDomainNotice(contents string) bool + func (c *License) MultipleMatch(contents string, includeHeaders bool) stringclassifier.Matches + func (c *License) NearestMatch(contents string) *stringclassifier.Match + func (c *License) WithinConfidenceThreshold(conf float64) bool + type OptionFunc func(l *License) error + func Archive(f string) OptionFunc + func ArchiveBytes(b []byte) OptionFunc + func ArchiveFunc(f func() ([]byte, error)) OptionFunc