Files
HackBrowserData/internal/browser/userdatadir.go
T
Roger 9e9d1c531d refactor: rename identifiers and expand the browser table (#685)
Names say what each thing is: no package stutter, one word per concept, spelled out, none that differ only in case.
The browser table puts one field per line. Wire names (flags, output fields, keys.json) are unchanged.
2026-11-09 17:25:35 +08:00

25 lines
895 B
Go

package browser
// DiscoverOptions is everything discovery would otherwise read from the environment.
type DiscoverOptions struct {
HomeDir string // the user's home directory; tests pass a temp dir
ProfilePath string // the -p value; "" when not given
}
// UserDataDirID is Browser.Name, then "-2", "-3"... in Path order; its own type keeps it apart from that name.
type UserDataDirID string
// UserDataDir is one browser data directory found on this machine; ID also names its snapshot and archive directory.
type UserDataDir struct {
ID UserDataDirID
Browser Browser
Path string
Profiles []Profile
}
// Profile is one profile within a user data dir. Name is the output's profile value and never a path.
type Profile struct {
Name string
RelativePath string // slash-separated, relative to UserDataDir.Path; "" when the user data dir itself is the profile
}