1
0
Fork 0

Implement collect CLI tool

- Add Go implementation with modular architecture
- Support --name flag for exact filename matching
- Support --match flag for directory glob pattern matching
- Create tar.gz and zip archives preserving directory structure
- Handle errors with appropriate exit codes
- Skip files with permission errors gracefully
- Add comprehensive test suite with 11 test cases
This commit is contained in:
Andrew Tomaka 2025-06-12 21:38:00 -04:00
parent 216461fa96
commit eb88ef97c0
8 changed files with 684 additions and 0 deletions

8
archiver/archiver.go Normal file
View file

@ -0,0 +1,8 @@
package archiver
import "github.com/atomaka/collect/collector"
// Archiver defines the interface for creating archives
type Archiver interface {
Create(outputPath string, files []collector.FileEntry) error
}