ignore

package
v0.7.5 Latest Latest
Warning

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

Go to latest
Published: Nov 19, 2026 License: MIT Imports: 6 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

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsCaseInsensitiveFS added in v0.7.1

func IsCaseInsensitiveFS() bool

IsCaseInsensitiveFS reports whether the OS resolves filenames case-insensitively by default. In GoCode, Windows and macOS are treated as case-insensitive filesystems per project platform policy (NTFS and default APFS/HFS+ are case-insensitive). Note: While macOS supports case-sensitive APFS volumes as an opt-in format, standard installations are case-insensitive, matching Git's core.ignoreCase default.

Types

type Matcher

type Matcher interface {
	IsIgnored(path string, isDir bool) bool
}

Matcher evaluates whether file paths match ignore patterns.

func LoadMatcher

func LoadMatcher(dir string) Matcher

LoadMatcher searches for .gocodeignore (or .gitignore as fallback) starting from dir.

type SensitiveMatcher added in v0.4.0

type SensitiveMatcher struct {
	Inner    Matcher
	Patterns []string
}

SensitiveMatcher also checks built-in sensitive file patterns.

func NewSensitiveMatcher added in v0.4.0

func NewSensitiveMatcher(inner Matcher, extraPatterns []string) *SensitiveMatcher

NewSensitiveMatcher combines an inner matcher with sensitive patterns.

func (*SensitiveMatcher) IsIgnored added in v0.4.0

func (s *SensitiveMatcher) IsIgnored(path string, isDir bool) bool

IsIgnored checks both the inner matcher and the sensitive file patterns.

func (*SensitiveMatcher) IsSensitive added in v0.4.0

func (s *SensitiveMatcher) IsSensitive(path string) string

IsSensitive returns the matching pattern, or "" if not sensitive.

func (*SensitiveMatcher) ShouldBlock added in v0.4.0

func (s *SensitiveMatcher) ShouldBlock(path string, isDir bool) (bool, string)

ShouldBlock combines IsIgnored and IsSensitive checks.

Jump to

Keyboard shortcuts

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