Versions in this module Expand all Collapse all v0 v0.2.0 Aug 26, 2026 Changes in this version + func ErrorCode(err error) string + func ErrorMessage(err error) string + func IsContextError(err error) bool + func IsResourceLimit(err error) bool + type Config struct + Globs []string + MaxResults int + Mode Mode + RequestLimit int + Workers int + type Emitter func(Event) error + type Error struct + Code string + Err error + func (e *Error) Error() string + func (e *Error) Unwrap() error + type Event struct + Code string + Column int + Commit string + CommitInfo *provider.CommitInfo + Context string + Line int + Message string + Mode Mode + Path string + Provider string + Repository string + RequestedRef string + ResolvedRef string + SchemaVersion int + Submatches []Submatch + Summary *Summary + Text string + Type string + func NewMetaEvent(snapshot provider.Snapshot, mode Mode, includeCommitInfo bool) Event + func NewSummaryEvent(summary Summary) Event + func (e Event) MarshalJSON() ([]byte, error) + type FileResult struct + Events []Event + HitLimit bool + Matches int + type GlobSet struct + func CompileGlobs(patterns []string) (*GlobSet, error) + func (g *GlobSet) Match(filePath string) bool + type Matcher struct + func NewMatcher(config MatcherConfig) (*Matcher, error) + func (m *Matcher) LiteralPrefix() string + func (m *Matcher) Scan(filePath string, reader io.Reader, maxMatches int) (FileResult, error) + func (m *Matcher) ScanEmit(filePath string, reader io.Reader, maxMatches int, emit func(Event) error) (FileResult, error) + func (m *Matcher) ScanEmitContext(ctx context.Context, filePath string, reader io.Reader, maxMatches int, ...) (FileResult, error) + type MatcherConfig struct + After int + Before int + Fixed bool + IgnoreCase bool + Pattern string + Word bool + type Mode string + const ModeAuto + const ModeExact + const ModeIndexed + type Runner struct + Cache *cache.Cache + Config Config + Matcher *Matcher + Provider provider.Provider + func (r *Runner) Run(ctx context.Context, snapshot provider.Snapshot, emit Emitter) (Summary, error) + type Submatch struct + End int + Start int + Text string + type Summary struct + APIRequests int + APIRetries int + CacheHits int + Complete bool + DownloadedBytes int64 + DurationMS int64 + MatchedFiles int + MatchedLines int + RateLimit *provider.RateLimit + Reason string + RequestLimit int + ScannedFiles int + SkippedBinary int + Transport string + Truncated bool