libgitignore

package
v0.0.5 Latest Latest
Warning

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

Go to latest
Published: Jun 21, 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)

Types

type GitIgnore

type GitIgnore struct {
	// 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 AppendIgnoreLines

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

func AppendIgnoreText

func AppendIgnoreText(gi *GitIgnore, text string) (*GitIgnore, error)

func CompileIgnoreFile

func CompileIgnoreFile(path string) (*GitIgnore, error)

func CompileIgnoreLines

func CompileIgnoreLines(lines ...string) (*GitIgnore, error)

func CompileIgnoreText

func CompileIgnoreText(text string) (*GitIgnore, error)

func GenerateIntegratedGitIgnore

func GenerateIntegratedGitIgnore(workingDir string, gitignorePath string, additionallyFileList []string) *GitIgnore

func NewGitignore

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

func NewPlainIgnoreRule

func NewPlainIgnoreRule() *GitIgnore

func (*GitIgnore) Matches

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

func (*GitIgnore) MatchesPathHow

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

type IgnorePattern

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

Jump to

Keyboard shortcuts

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