diff --git a/README.md b/README.md index 2c7e3c3..19b3e14 100644 --- a/README.md +++ b/README.md @@ -1077,17 +1077,15 @@ the Development section below, and who ships a register the four above then draw - **`Column` carries text, not a Go value.** `Value` is the rendered string beside `DataType` and `Null`, which each serializer writes as the load check proved it; a `Value any` would hand every caller a type switch. -- **`hold` names what a render keeps, `draw` what it draws.** Goal 2 wants a name to - reach one unit: `hold`, `holdSet` and `renderScope` are what a render holds while it - renders, and `draw`, `drawGroup` and `drawfence.go`'s units are the draws and the - load fence over them, so `holdfence.go` fences the hold an expansion keeps and - `drawfence.go` the reference draws `holdset.go` keeps. Valid while the load fences - sit in files of their own. -- **A function may not spell a method; two types may.** A call writes a method with - its receiver and a function bare, so one name on both greps as one unit, which is - the reaching cost goal 2 counts, while the receiver before a shared method name - says which type answers. A type is outside the rule, never being called. - `TestNoFunctionSpellsAMethod` holds it over the package, its tests included. +- **`hold` names what a draw is kept in, `draw` the draw itself.** Goal 2 wants a name + to reach one unit, so a unit takes the stem of what it is, and a file the stem of the + units it holds. +- **A function may not spell a method; two types may.** A call writes a method with its + receiver and a function bare, so one name on both greps as one unit, which is the + reaching cost goal 2 counts, while the receiver before a shared method name says + which type answers. `TestNoFunctionSpellsAMethod` holds it. A type is outside the + rule: `renderScope.hold` answers with a `*hold`, so the two spell one unit, which no + test can judge. - **The package stays flat.** Go ties a package to one directory, so folders would split the API into packages. - **The performance gate asserts allocations, not wall-clock time.** `AllocsPerRun` diff --git a/naming_test.go b/naming_test.go index 80d609a..53cc589 100644 --- a/naming_test.go +++ b/naming_test.go @@ -23,8 +23,6 @@ func TestNoFunctionSpellsAMethod(t *testing.T) { } } -// namespaceFiles is every file declaring into the package namespace, its in-package -// tests included. func namespaceFiles(t *testing.T) []*ast.File { t.Helper() pkg := packageDir(t) @@ -32,8 +30,6 @@ func namespaceFiles(t *testing.T) []*ast.File { return files } -// declaredCalls is what each name is called as: a function, and the methods -// spelling it under the types declaring them. func declaredCalls(files []*ast.File) (funcs map[string]bool, methods map[string][]string) { funcs, methods = map[string]bool{}, map[string][]string{} for _, f := range files {