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:
parent
216461fa96
commit
eb88ef97c0
8 changed files with 684 additions and 0 deletions
8
archiver/archiver.go
Normal file
8
archiver/archiver.go
Normal 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
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue