diff options
| author | Jeff Carr <[email protected]> | 2025-10-12 06:17:32 -0500 |
|---|---|---|
| committer | Jeff Carr <[email protected]> | 2025-10-12 06:17:32 -0500 |
| commit | cc600fe686e905a696cbc840decdd8d24b7bb72f (patch) | |
| tree | 554d5f681be526406cb0ee826f85ce7257ada80b /history.go | |
| parent | a21a55ea6679b9e97ed1a51ac80e71c5d9770607 (diff) | |
more cleaning
Diffstat (limited to 'history.go')
| -rw-r--r-- | history.go | 10 |
1 files changed, 3 insertions, 7 deletions
@@ -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 } |
