Registry / utility / sabhiram-go-gitignore

sabhiram-go-gitignore

JSON →
library0.0.0-20210923224102-525f6e181f06gogounverified

A library that returns an ignorer object to test paths against .gitignore patterns.

go get github.com/sabhiram/go-gitignore
INSTALL
IMPORT
SIG · SABHIRAM-GO-GITIGN
S
sabhiram-go-gitignore
utilitygov0.0.0-20210923224102-525f6e181f06
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

gitignore
github.com/sabhiram/go-gitignore

Compiles .gitignore-style patterns and tests paths against them.

package main import ( "fmt" "github.com/sabhiram/go-gitignore" ) func main() { ig := gitignore.CompileIgnoreLines("*.log", "tmp/") fmt.Println(ig.MatchesPath("error.log")) // true }
Debug
Known issues

No known issues recorded.

Upgrade
Version history
0.0.0-20210923224102-525f6e181f06latest on pkg.go.dev
Audit
Dependencies

No dependency data recorded yet.

Agent activity
4 hits · last 30 days
node
4
Resources
sabhiram-go-gitignore — go get sabhiram-go-gitignore · libregistry