Files
HackBrowserData/cmd/hack-browser-data/names.go
T
Roger 4e98ba7884 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.
2026-11-01 23:42:13 +08:00

27 lines
648 B
Go

package main
import (
"io"
"strings"
"github.com/moond4rk/hackbrowserdata/internal/app"
"github.com/moond4rk/hackbrowserdata/internal/browser"
"github.com/moond4rk/hackbrowserdata/internal/category"
"github.com/moond4rk/hackbrowserdata/internal/log"
)
func browserNames() string {
return strings.Join(browser.IDs(), "|")
}
func categoryNames() string {
return strings.Join(category.Names(), ",")
}
// report prints the run's summary; it is not part of the output, so failing to print it never fails the run.
func report(w io.Writer, s app.Summary) {
if err := app.Report(w, s); err != nil {
log.Warnf("print summary: %v", err)
}
}