gitignore

package
v0.0.0-...-9994f1b Latest Latest
Warning

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

Go to latest
Published: Feb 22, 2025 License: BSD-3-Clause Imports: 7 Imported by: 0

Documentation

Overview

Package gitignore implements .gitignore check predicate.

Uses only checked in .gitignore files, ignoring any globals.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewExcluder

func NewExcluder(dir, ignoreFile string) (fileset.Excluder, error)

NewExcluder returns a predicate that checks whether the given absolute path under given `dir` is excluded by some `ignoreFile` (usually ".gitignore") file which is active in that directory.

func NewPatternExcluder

func NewPatternExcluder(patterns []string) fileset.Excluder

NewPatternExcluder returns a predicate that returns true if the path is excluded by any of the given .gitignore patterns.

Types

This section is empty.

Jump to

Keyboard shortcuts

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