filter

package
v0.0.10 Latest Latest
Warning

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

Go to latest
Published: Aug 25, 2026 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HasExcludedPathSegment added in v0.0.8

func HasExcludedPathSegment(file string, segments []string) bool

HasExcludedPathSegment reports whether file has any path component that exactly equals one of the given segment names. Backslashes are normalized to slashes; empty components and empty segment entries are ignored.

Types

type LegacyOptions deprecated

type LegacyOptions struct {
	Suffix        []string // include .go
	ExcludeSuffix []string // exclude _test.go

	ExcludePath []string // exclude vendor/
}

Deprecated: use Options instead

func (*LegacyOptions) Match

func (c *LegacyOptions) Match(file string) bool

type Options

type Options struct {
	Suffix        []string // include .go
	ExcludeSuffix []string // exclude _test.go

	Include []string
	Exclude []string

	// ExcludePathSegments drops files whose path has any exact path-component
	// matching a listed name (e.g. "vendor", "node_modules"). Callers supply
	// the list; the library does not hardcode defaults.
	ExcludePathSegments []string
}

func (*Options) MatchSuffix

func (c *Options) MatchSuffix(file string) bool

Jump to

Keyboard shortcuts

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