Versions in this module Expand all Collapse all v0 v0.8.0 Sep 6, 2026 Changes in this version + func IsLegalPath(filePath string) bool type Result + SPDXDeclarations []SPDXDeclaration + type SPDXDeclaration struct + End int + Expression string + Start int v0.7.0 Sep 4, 2026 v0.6.0 Aug 21, 2026 Changes in this version + const DefaultMaxDepth + const DefaultMaxFileSize + const DefaultMaxFiles + const ReportSchemaVersion + const ScannerName + const ScopeAll + const ScopeProject + func LegalFileRoles(filePath string) []string + func ValidateScanOptions(options ScanOptions) error + type CorpusRecord struct + RuleCount int + SourceCommit string + Version string + type DeclaredRecord struct + LicenseFile string + NormalizedExpression string + Path string + Raw []string + type DetectionRecord struct + Expression string + Identification Identification + Matches []MatchRecord + type ExpressionRecord struct + Expression string + Files int + Identification Identification + Matches int + Root bool + type FileRecord struct + Clues []MatchRecord + Detections []DetectionRecord + Encoding string + LicenseTextCoverage float64 + Path string + Roles []string + SHA256 string + Size int64 + Text string + type MatchRecord struct + Coverage float64 + End int + Kind Kind + LicenseIDs []string + Matched string + Method Method + RuleID string + Score float64 + Start int + type ScanErrorRecord struct + Error string + Path string + type ScanOptions struct + IncludeLegalFiles bool + MaxDepth int + MaxFileSize int64 + MaxFiles int + NoDefaultSkip bool + ScannerVersion string + SkipDirs map[string]bool + Workers int + func DefaultScanOptions() ScanOptions + type ScanReport struct + Corpus CorpusRecord + Declared []DeclaredRecord + Errors []ScanErrorRecord + Expressions []ExpressionRecord + Files []FileRecord + Root string + Scanner ScannerRecord + Schema int + Scope string + Skipped []SkipRecord + Summary ScanSummary + func ScanRepository(ctx context.Context, matcher *Matcher, root string, options ScanOptions) (ScanReport, error) + type ScanSummary struct + BytesScanned int64 + DirectoriesSkipped int + ErrorCount int + FilesScanned int + FilesSkippedBinary int + FilesSkippedOther int + FilesSkippedSize int + FilesVisited int + FilesWithClues int + FilesWithDetections int + FilesWithIdentifiedDetections int + FilesWithNoAssertionDetections int + FilesWithPartialDetections int + Truncated bool + type ScannerRecord struct + Name string + Version string + type SkipRecord struct + Path string + Reason string v0.5.0 Aug 21, 2026 v0.4.0 Aug 14, 2026 v0.3.0 Jul 31, 2026 v0.2.0 Jul 30, 2026 Changes in this version + var ErrTooManyMatches = errors.New("licenses: too many exact-match candidates") + type CorpusInfo struct + RuleCount int + SourceCommit string + Version string + type Detection struct + Expression string + Identification Identification + Matches []Match + type Identification string + const Identified + const NoAssertion + const Partial + type Kind string + const KindClue + const KindIntro + const KindNotice + const KindReference + const KindTag + const KindText + const KindUnknown + type Match struct + Coverage float64 + End int + Kind Kind + LicenseIDs []string + Matched []byte + Method Method + RuleID string + Score float64 + Start int + type Matcher struct + func New(options ...Option) (*Matcher, error) + func (m *Matcher) Corpus() CorpusInfo + func (m *Matcher) Match(ctx context.Context, b []byte) (Result, error) + type Method string + const Exact + const Hash + const SpdxID + type Option func(*matcherOptions) + func WithMatchedText() Option + type Result struct + Clues []Match + Corpus CorpusInfo + Detections []Detection v0.1.0 Jul 29, 2026