summaryrefslogtreecommitdiff
path: root/stuff.go
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2025-10-09 02:28:00 -0500
committerJeff Carr <[email protected]>2025-10-09 03:02:55 -0500
commit7c3071e03327917678e8b22778b55c5b5f717314 (patch)
treebccc513d5d8698c8650bd8cdd1cf050d7889db46 /stuff.go
parentaf8a330c63c650ad272ee9092d749374510dd190 (diff)
start making packages protobuf
Diffstat (limited to 'stuff.go')
-rw-r--r--stuff.go10
1 files changed, 9 insertions, 1 deletions
diff --git a/stuff.go b/stuff.go
index b1e8283..38a68e8 100644
--- a/stuff.go
+++ b/stuff.go
@@ -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