Naming, layout and comments: descriptive full-word names, one item per line in wrapped calls and literals, and doc comments on exported names

Short and single-letter names in application code become full words (tests
keep theirs). Wrapped calls, signatures and composite literals put one item
per line, and one-line function bodies are expanded. Exported names and
groups of constants get doc comments, and comments refer to the renamed
identifiers.
This commit is contained in:
bwilliams committed 2026-10-15 16:12:56 +01:00
1 parent 043e307663
commit 465358609a
78 files changed
+2374 -1402

No files matched your search

+6 -2
View File
@@ -79,7 +79,9 @@ func openTestStore(t *testing.T) *Store {
if err != nil {
t.Fatal(err)
}
t.Cleanup(func() { store.Close() })
t.Cleanup(func() {
store.Close()
})
return store
}
@@ -92,7 +94,9 @@ func TestHandlerRejectsBadRequests(t *testing.T) {
t.Errorf("POST: status %d, want 405", rec.Code)
}
cursor := func(s string) string { return base64.RawURLEncoding.EncodeToString([]byte(s)) }
cursor := func(s string) string {
return base64.RawURLEncoding.EncodeToString([]byte(s))
}
cases := map[string]string{
"limit=0": "limit must be an integer between 1 and 100",
"limit=101": "limit must be an integer between 1 and 100",