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

gitignore

package
v0.2.16 Latest Latest
Warning

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

Go to latest
Published: Oct 18, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Matcher

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

Matcher checks whether paths are gitignored using go-git's gitignore parser.

func Load

func Load(dir string) *Matcher

Load reads .gitignore patterns from a directory, walking up to find the git root.

func (*Matcher) Match

func (m *Matcher) Match(path []string, isDir bool) bool

Match returns true if the path matches any gitignore pattern.

func (*Matcher) MatchDir

func (m *Matcher) MatchDir(name string) bool

MatchDir returns true if a directory name matches any gitignore pattern.

Jump to

Keyboard shortcuts

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