fix: report unreadable sources and tidy the pipeline (#675)

A Stat error other than not-exist was reported as absent, and the --zip archive was readable by other users.
The rest is review follow-up: export no longer prints, one runner type, shared name helpers, a trimmed log API.
This commit is contained in:
Roger authored and GitHub committed 2026-11-01 23:42:13 +08:00
1 parent 6d6191b4c6
commit 4e98ba7884
33 files changed
+303 -315

No files matched your search

+9
View File
@@ -47,6 +47,15 @@ func All() []Category {
return []Category{Password, Cookie, Bookmark, History, Download, CreditCard, Extension, LocalStorage, SessionStorage}
}
func Names() []string {
all := All()
names := make([]string, len(all))
for i, c := range all {
names[i] = c.String()
}
return names
}
func Parse(s string) (Category, error) {
for _, c := range All() {
if c.String() == s {
+6
View File
@@ -60,3 +60,9 @@ func TestZeroIsNone(t *testing.T) {
var c Category
assert.NotContains(t, All(), c)
}
func TestNames(t *testing.T) {
assert.Equal(t, []string{
"password", "cookie", "bookmark", "history", "download", "creditcard", "extension", "localstorage", "sessionstorage",
}, Names())
}