This is a fork of the original sabhiram/go-gitignore repository with the following updates:
Why this fork? The original repository is no longer actively maintained. The original author used Git tag 1.0.2 instead of v1.0.2 (required by Go module rules). These updates ensure compatibility with modern Go versions, fix deprecation warnings, and maintain the project's usability for current Go developers.
- Module name: Changed to
github.com/argcv/go-gitignore - Go version: Upgraded to 1.23
- Testify: Upgraded to v1.10.0
- Replaced deprecated
ioutilfunctions withosequivalents:ioutil.ReadFile→os.ReadFileioutil.WriteFile→os.WriteFile
- Fixed code formatting in
ignore.gocomments - Reorganized imports in test files
- Updated
go.modandgo.sumwith new dependencies - Added
/vendor/directory to.gitignoreto exclude vendored dependencies - Removed
version_gen.gofile as it's no longer needed
A gitignore parser for Go
go get github.com/sabhiram/go-gitignoreFor a quick sample of how to use this library, check out the tests under ignore_test.go.