diff options
| author | Jeff Carr <[email protected]> | 2025-10-09 02:28:00 -0500 |
|---|---|---|
| committer | Jeff Carr <[email protected]> | 2025-10-09 03:02:55 -0500 |
| commit | 7c3071e03327917678e8b22778b55c5b5f717314 (patch) | |
| tree | bccc513d5d8698c8650bd8cdd1cf050d7889db46 /stuff.go | |
| parent | af8a330c63c650ad272ee9092d749374510dd190 (diff) | |
start making packages protobuf
Diffstat (limited to 'stuff.go')
| -rw-r--r-- | stuff.go | 10 |
1 files changed, 9 insertions, 1 deletions
@@ -18,13 +18,21 @@ import ( ) // scanDebs finds all .deb files and extracts their metadata. -func scanDebs(root string) ([]DebInfo, error) { +func scanDebs(root string, count int) ([]DebInfo, error) { var debs []DebInfo + var counter int err := filepath.Walk(root, func(path string, info os.FileInfo, err error) error { if err != nil { return err } if !info.IsDir() && strings.HasSuffix(info.Name(), ".deb") { + if count == -1 { + return nil + } + counter += 1 + if counter > count { + return nil + } log.Printf(" -> Processing %s", path) // Get control info |
