ignore

package
v3.3.41 Latest Latest
Warning

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

Go to latest
Published: Feb 22, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var LinuxGitignore []byte
View Source
var WindowsGitignore []byte

Functions

func New

func New(overrides ...string) (*ignore.GitIgnore, error)

New creates a new GitIgnore instance based on the current operating system's default ignore patterns, with optional overrides. If overrides are provided, they will be used instead of the default patterns. If no overrides are provided, the function will use the default ignore patterns for the current operating system.

func NewWithAllowList added in v3.2.229

func NewWithAllowList(allowed ...string) (*ignore.GitIgnore, error)

NewWithAllowList creates a new GitIgnore instance based on the OS specific defaults, but removes items in the allow list from the ignored patterns. If no allow list is provided, it will use the default ignore patterns for the current operating system, which is the same behavior as calling New() with no arguments.

func NewWithDenyList added in v3.2.234

func NewWithDenyList(denied ...string) (*ignore.GitIgnore, error)

NewWithDenyList creates a new GitIgnore instance based on the OS specific defaults, and adds items in the deny list to the ignored patterns. If no deny list is provided, it will use the default ignore patterns for the current operating system, which is the same behavior as calling New() with no arguments.

Types

This section is empty.

Jump to

Keyboard shortcuts

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