Help us shape the future of Go! Take the 2026 Go Developer Survey

discover

package
v0.3.4 Latest Latest
Warning

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

Go to latest
Published: Mar 3, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var IGNORE_PATTERNS = map[string]bool{
	".cache": true, ".claude": true, ".eclipse": true, ".eggs": true,
	".env": true, ".git": true, ".gradle": true, ".hg": true,
	".idea": true, ".maven": true, ".mypy_cache": true, ".nox": true,
	".npm": true, ".nyc_output": true, ".pnpm-store": true,
	".pytest_cache": true, ".qdrant_code_embeddings": true,
	".ruff_cache": true, ".svn": true, ".tmp": true, ".tox": true,
	".venv": true, ".vs": true, ".vscode": true, ".yarn": true,
	"__pycache__": true, "bin": true, "bower_components": true,
	"build": true, "coverage": true, "dist": true, "env": true,
	"htmlcov": true, "node_modules": true, "obj": true, "out": true,
	"Pods": true, "site-packages": true, "target": true, "temp": true,
	"tmp": true, "vendor": true, "venv": true,
}

IGNORE_PATTERNS are directory names to skip during discovery.

View Source
var IGNORE_SUFFIXES = map[string]bool{
	".tmp": true, "~": true, ".pyc": true, ".pyo": true,
	".o": true, ".a": true, ".so": true, ".dll": true, ".class": true,
}

IGNORE_SUFFIXES are file suffixes to skip.

Functions

This section is empty.

Types

type FileInfo

type FileInfo struct {
	Path     string        // absolute path
	RelPath  string        // relative to repo root
	Language lang.Language // detected language
}

FileInfo represents a discovered source file.

func Discover

func Discover(ctx context.Context, repoPath string, opts *Options) ([]FileInfo, error)

Discover walks a repository and returns all source files.

type Options

type Options struct {
	IgnoreFile string // path to .cgrignore file (optional)
}

Options configures file discovery.

Jump to

Keyboard shortcuts

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