Pull request: querylog: more opt
Updates 1273. Squashed commit of the following: commit 167c0b5acaab8a2676de2cea556c861dc0efbc72 Author: Ainar Garipov <A.Garipov@AdGuard.COM> Date: Mon Apr 12 18:12:43 2021 +0300 querylog: imp naming commit 5010ad113e46335011a721cbcc9fc9b1fc623722 Author: Ainar Garipov <A.Garipov@AdGuard.COM> Date: Mon Apr 12 17:53:41 2021 +0300 querylog: more opt
This commit is contained in:
27
HACKING.md
27
HACKING.md
@@ -243,6 +243,33 @@ on GitHub and most other Markdown renderers. -->
|
||||
|
||||
* Use named returns to improve readability of function signatures.
|
||||
|
||||
* When naming a file which defines an enitity, use singular nouns, unless the
|
||||
entity is some form of a container for other entities:
|
||||
|
||||
```go
|
||||
// File: client.go
|
||||
|
||||
package foo
|
||||
|
||||
type Client struct {
|
||||
// …
|
||||
}
|
||||
```
|
||||
|
||||
```go
|
||||
// File: clients.go
|
||||
|
||||
package foo
|
||||
|
||||
type Clients []*Client
|
||||
|
||||
// …
|
||||
|
||||
type ClientsWithCache struct {
|
||||
// …
|
||||
}
|
||||
```
|
||||
|
||||
### <a id="testing" href="#testing">Testing</a>
|
||||
|
||||
* Use `assert.NoError` and `require.NoError` instead of `assert.Nil` and
|
||||
|
||||
Reference in New Issue
Block a user