summaryrefslogtreecommitdiff
path: root/history.go
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2025-10-12 06:17:32 -0500
committerJeff Carr <[email protected]>2025-10-12 06:17:32 -0500
commitcc600fe686e905a696cbc840decdd8d24b7bb72f (patch)
tree554d5f681be526406cb0ee826f85ce7257ada80b /history.go
parenta21a55ea6679b9e97ed1a51ac80e71c5d9770607 (diff)
more cleaning
Diffstat (limited to 'history.go')
-rw-r--r--history.go10
1 files changed, 3 insertions, 7 deletions
diff --git a/history.go b/history.go
index c048c1c..f26ba8e 100644
--- a/history.go
+++ b/history.go
@@ -11,12 +11,12 @@ import (
durationpb "google.golang.org/protobuf/types/known/durationpb"
)
-func (newpb *Auto) getHistoryPB() error {
+func (newpb *Auto) getHistoryPB() (*Autos, error) {
all := NewAutos()
err := config.LoadCache(all, "argv", newpb.Argname) // loads ~/.cache/argv/forge.pb
if err != nil {
// newpb.History = false
- return err
+ return all, err
}
if all.Len() == 0 {
@@ -25,10 +25,6 @@ func (newpb *Auto) getHistoryPB() error {
err = all.Save()
}
- if newpb.Debug {
- all.PrintHistory()
- }
-
var last *Auto
// find the last entry. this is dumb way to do it
for found := range all.IterAll() {
@@ -53,5 +49,5 @@ func (newpb *Auto) getHistoryPB() error {
err = all.Save()
newpb.Debugf("WRITE DEBUG: write PB='%s' len(pb)=%d config.Save().err=%v", all.Filename, all.Len(), err)
- return err
+ return all, err
}