scanner

package
v0.0.9 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 26, 2026 License: MIT Imports: 9 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package scanner discovers source files in a workspace directory, respecting gitignore rules and custom include/exclude patterns.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ScanWorkspace

func ScanWorkspace(rootPath string, opts ...Option) (*models.ScannedWorkspace, error)

ScanWorkspace is a convenience entrypoint for a one-off scan.

Types

type Option

type Option func(*ScanOptions)

Option mutates ScanOptions for a scanner.

func WithExcludePatterns

func WithExcludePatterns(patterns ...string) Option

WithExcludePatterns configures user exclude patterns.

func WithIncludePatterns

func WithIncludePatterns(patterns ...string) Option

WithIncludePatterns configures user include patterns that re-include paths.

func WithOutputPath

func WithOutputPath(path string) Option

WithOutputPath excludes the generated output directory from scan results.

type ScanOptions

type ScanOptions struct {
	OutputPath      string
	IncludePatterns []string
	ExcludePatterns []string
}

ScanOptions configures a workspace scan.

type Scanner

type Scanner struct {
	// contains filtered or unexported fields
}

Scanner discovers supported source files inside a repository workspace.

func NewScanner

func NewScanner(opts ...Option) *Scanner

NewScanner constructs a scanner using functional options.

func (*Scanner) ScanWorkspace

func (s *Scanner) ScanWorkspace(rootPath string) (*models.ScannedWorkspace, error)

ScanWorkspace scans a repository root and returns supported source files grouped by language.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL