| 1 |
# Dependencies |
| 2 |
|
| 3 |
This document describes the external dependencies used by the gitconfig project. |
| 4 |
|
| 5 |
## No CGo Dependency |
| 6 |
|
| 7 |
⚠️ **Important:** This project explicitly does NOT use CGo. All dependencies are pure Go, which enables: |
| 8 |
|
| 9 |
- Cross-platform compilation (Windows, macOS, Linux) |
| 10 |
- No C/C++ compiler required |
| 11 |
- Static binary generation |
| 12 |
- Simplified deployment |
| 13 |
|
| 14 |
## Dependency Rationale |
| 15 |
|
| 16 |
### Why not use standard library only? |
| 17 |
|
| 18 |
1. **glob package:** Go's filepath.Match is too limited. We need: |
| 19 |
- Double-asterisk (`**`) support for path matching |
| 20 |
- Proper path component handling |
| 21 |
- Character classes and ranges |
| 22 |
|
| 23 |
2. **gopass utilities:** Existing integration with gopass parent project requires these utilities |
| 24 |
|
| 25 |
### Future Optimization Opportunities |
| 26 |
|
| 27 |
- **Consider:** Reducing gopass dependency or making it optional |
| 28 |
- **Consider:** Implementing lightweight glob matching if performance is critical |
| 29 |
- **Note:** Keep testify as test-only dependency; it's well-maintained and improves test clarity |
| 30 |
|
| 31 |
## Licensing |
| 32 |
|
| 33 |
All dependencies use licenses compatible with gitconfig's MIT license: |
| 34 |
|
| 35 |
- gobwas/glob: MIT |
| 36 |
- gopasspw/gopass: MIT |
| 37 |
- stretchr/testify: MIT (Apache 2.0 compatible) |
| 38 |
|
| 39 |
## Updating Dependencies |
| 40 |
|
| 41 |
To update dependencies: |
| 42 |
|
| 43 |
```bash |
| 44 |
# Check for available updates |
| 45 |
go list -u -m all |
| 46 |
|
| 47 |
# Update a specific dependency |
| 48 |
go get -u github.com/package/name |
| 49 |
|
| 50 |
# Update all dependencies |
| 51 |
go get -u ./... |
| 52 |
|
| 53 |
# Tidy the go.mod file |
| 54 |
go mod tidy |
| 55 |
``` |
| 56 |
|
| 57 |
After updating dependencies, always: |
| 58 |
|
| 59 |
1. Run tests: `make test` |
| 60 |
2. Run linting: `make codequality` |
| 61 |
3. Verify cross-compilation: `make crosscompile` |