summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
inline | side by side (from parent 1:
9b1705c)
Code that gets a user in another file for an unrelated purpose moves to
a file named for its function in the same change. The file rules covered
only new code, and the rule against unrelated changes made an agent
leave a shared helper in the file of its first user, where it hid a
dependency of the new caller.
function. Do not create `main_test.go`.
- A file carries its own context. Keep each struct and all of its
methods in one file. Give a separate responsibility its own type.
function. Do not create `main_test.go`.
- A file carries its own context. Keep each struct and all of its
methods in one file. Give a separate responsibility its own type.
+- When code in one file gets a user in another file for an unrelated
+ purpose, move it to a file named for its function in the same change.
- Put entry points first, then each struct's methods as a group, then
standalone utility functions. Do not put a utility function between
the methods of one type.
- Put entry points first, then each struct's methods as a group, then
standalone utility functions. Do not put a utility function between
the methods of one type.