gitignore

package
v0.2.2 Latest Latest
Warning

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

Go to latest
Published: Nov 21, 2025 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ShouldIgnoreFile

func ShouldIgnoreFile(basePath, filePath string, isDir bool) (bool, error)

ShouldIgnoreFile is a convenience function that checks if a file should be ignored based on its absolute path and the base directory containing .gitignore

Types

type GitIgnore

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

GitIgnore represents a parsed .gitignore file

func NewGitIgnore

func NewGitIgnore(basePath string) (*GitIgnore, error)

NewGitIgnore creates a GitIgnore instance from a .gitignore file

func (*GitIgnore) IsIgnored

func (gi *GitIgnore) IsIgnored(relativePath string, isDir bool) bool

IsIgnored checks if a path should be ignored based on gitignore rules

Jump to

Keyboard shortcuts

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