feat: lazysecrets list's JSON says when an entry was last used, and how often

This commit is contained in:
keb committed 2026-10-14 21:24:01 +02:00
1 parent 0e4580f245
commit 33a9b0864d
3 files changed
+23 -11

No files matched your search

+2 -2
View File
@@ -115,9 +115,9 @@ func listCmd(providers []provider.Provider, st *store.Store, cachePath string, t
}
f = listing.Run(context.Background(), listing.Options{
Providers: providers, Cache: f, MaxAge: *maxAge, Cached: *cached, Kinds: only, Timeout: timeout,
Mark: func(link, account string) (bool, bool) {
Mark: func(link, account string) (bool, time.Time, int) {
n := st.Node(link)
return n.StarredFor(account), !n.LastUsed.IsZero()
return n.StarredFor(account), n.LastUsed, n.Uses
},
}, emit)
if cachePath != "" && !*cached {