gitignore

package
v0.0.0-...-841f565 Latest Latest
Warning

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

Go to latest
Published: Sep 28, 2022 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Domain

func Domain(base, path string) ([]string, error)

Domain parses the domain of a gitignore file by the base and the current path

func LoadRepoPatterns

func LoadRepoPatterns(repoDir string) (patterns []gitignorev5.Pattern, err error)

LoadRepoPatterns reads gitignore patterns recursively traversing through the directory structure. The result is in the ascending order of priority (last higher).

func NewMatcher

func NewMatcher(p []gitignorev5.Pattern) gitignorev5.Matcher

NewMatcher constructs a new global matcher. Patterns must be given in the order of increasing priority. That is most generic settings files first, then the content of the repo .gitignore, then content of .gitignore down the path or the repo and then the content command line arguments.

func ReadIgnoreFile

func ReadIgnoreFile(ignoreFilePath string, domain []string) (ps []gitignorev5.Pattern, err error)

ReadIgnoreFile reads a specific git ignore file.

Types

type Pattern

type Pattern gitignorev5.Pattern

Jump to

Keyboard shortcuts

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