Compare commits
1
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
9cc6d43c68 |
@@ -564,9 +564,9 @@ exported name, and reads them as one name: `http.Server`, `list.New`.
|
||||
`SetOwner()`), because the capital letter already tells the method from the
|
||||
field.
|
||||
|
||||
1. Begin a function's name with `Fetch` or `Load` when it returns a value from
|
||||
a database or the network (`FetchOwner`, never `GetOwner` or `Owner`),
|
||||
because the reader must know the call can be slow or fail.
|
||||
1. Start a getter's name with `Fetch` when it reads the value from a database
|
||||
or the network (`FetchOwner`, never `Owner` or `GetOwner`), because the
|
||||
reader must know the call can be slow or fail.
|
||||
|
||||
1. Name a one-method interface for its method plus `er` (`Reader`,
|
||||
`Formatter`), because the name then says the one thing a value of it does.
|
||||
|
||||
Reference in new issue
Block a user