mirror of
https://github.com/moonD4rk/HackBrowserData.git
synced 2026-12-04 05:43:27 +01:00
refactor: name dirs by what they hold, trim exports (#692)
Bare dir now always means a user data dir, so the snapshot root, the export listing, and the keys.json kind get their own words; names used only inside their package are no longer exported.
This commit is contained in:
1 parent
2e7ee3c69f
commit
a7741eaab2
40 files changed
+242
-256
No files matched your search
@@ -32,9 +32,10 @@ Dependencies point down only. Interfaces live with their consumer, nothing regis
|
||||
|
||||
## Naming
|
||||
|
||||
- A name is judged at its call site, qualified by its package, and never repeats the package's name.
|
||||
- A name is judged at its call site, qualified by its package, and never repeats the package's name, unless it names the one type the package exists for.
|
||||
- A name says what a thing is, not its role or its shape, and one concept has one word.
|
||||
- Names are spelled out; only Go's universal idioms stay short, and lint enforces it.
|
||||
- The domain's words: a **browser** is a row of the browser table; its **base** is what it is built on (Chromium, Firefox, or Safari); a **user data dir** is a browser's data directory, where an installation would be the program; and a **profile**, an **extraction**, a **snapshot**, a **record**, and a **category** mean what they say.
|
||||
- Unqualified, "dir" means a user data dir; any other directory is named for what it holds.
|
||||
|
||||
**Rejected:** "engine" for the base, which means the renderer; "origin" or "owner" for where a record came from, which are web and access-control terms; and "job" for an extraction, which suggests a worker pool that does not exist.
|
||||
Reference in new issue
Block a user