libgitignore

package
v1.1.8 Latest Latest
Warning

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

Go to latest
Published: Jun 30, 2025 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ReadFilesAsLines

func ReadFilesAsLines(workingDir string, files []string) ([]string, error)

func ToAbsDir added in v0.0.6

func ToAbsDir(dir string) string

Types

type GitIgnore

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

func AppendIgnoreFile

func AppendIgnoreFile(gi *GitIgnore, path string) (*GitIgnore, error)

func AppendIgnoreFileList

func AppendIgnoreFileList(gi *GitIgnore, workingDir string, fileList []string) (*GitIgnore, error)

func AppendIgnoreFileWithDir added in v0.0.6

func AppendIgnoreFileWithDir(gi *GitIgnore, path string, dir string) (*GitIgnore, error)

func AppendIgnoreLines

func AppendIgnoreLines(gi *GitIgnore, lines ...string) (*GitIgnore, error)

func AppendIgnoreLinesWithDir added in v0.0.6

func AppendIgnoreLinesWithDir(gi *GitIgnore, dir string, lines ...string) (*GitIgnore, error)

func CompileIgnoreLines

func CompileIgnoreLines(lines []string, dir string, startLine int, root string) (*GitIgnore, error)

func GenerateIntegratedGitIgnore

func GenerateIntegratedGitIgnore(allowGitignore bool, root string, additionallyFileList []string) (*GitIgnore, error)

func NewGitIgnore added in v0.0.6

func NewGitIgnore() *GitIgnore

func NewGitignore

func NewGitignore(workingDir string, fileList []string) (*GitIgnore, error)

func ParseGitIgnore added in v0.0.6

func ParseGitIgnore(path string, root string) (*GitIgnore, error)

func (*GitIgnore) MatchesPath added in v0.0.6

func (gi *GitIgnore) MatchesPath(path string) bool

func (*GitIgnore) MatchesPathHow

func (gi *GitIgnore) MatchesPathHow(path string) (bool, *IgnorePattern)

func (*GitIgnore) Patterns added in v0.0.6

func (gi *GitIgnore) Patterns() []*IgnorePattern

type IgnorePattern

type IgnorePattern struct {
	Regexp      *regexp.Regexp
	Negate      bool
	LineNo      int
	Raw         string
	Dir         string
	AnchorSlash bool
}

func CompileIgnoreLine added in v0.0.6

func CompileIgnoreLine(raw string, dir string, lineno int, root string) (*IgnorePattern, error)

Jump to

Keyboard shortcuts

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