diff options
| author | Jeff Carr <[email protected]> | 2025-10-09 11:44:55 -0500 |
|---|---|---|
| committer | Jeff Carr <[email protected]> | 2025-10-09 13:16:00 -0500 |
| commit | 6910b06ff957337af42f89c1a19072cb75c0ae74 (patch) | |
| tree | 6cc3df581542417ebf4138206cf5b581c7719cee /doList.go | |
| parent | 95a24844db73df3e55d30b8f96e1e05c4974b71f (diff) | |
more fixes and touchupsv0.0.15
Diffstat (limited to 'doList.go')
| -rw-r--r-- | doList.go | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/doList.go b/doList.go new file mode 100644 index 0000000..e46e7db --- /dev/null +++ b/doList.go @@ -0,0 +1,30 @@ +package main + +import ( + "os" + + "go.wit.com/lib/config" + "go.wit.com/log" +) + +func doList() (string, error) { + os.Chdir(me.mirrorsDir) + footer := me.pb.PrintTable() + log.Info("found so far:", footer) + + var changed bool + for p := range me.pb.IterAll() { + if config.Exists(p.Filename) { + // everything is fine + continue + } + log.Info("deleting missing file from PB", p.Package, p.Filename) + me.pb.Delete(p) + changed = true + } + + if changed { + me.pb.Save() + } + return footer, nil +} |
