Update go guidelines, fix some minor typos

This commit is contained in:
Lucas Charles 2019-03-27 04:26:25 +00:00 committed by Evan Read
parent 81807d53bf
commit 66dccb7fa8
1 changed files with 2 additions and 2 deletions

View File

@ -26,7 +26,7 @@ Reviewers and maintainers should pay attention to:
- `defer` functions: ensure the presence when needed, and after `err` check. - `defer` functions: ensure the presence when needed, and after `err` check.
- Inject dependencies as parameters. - Inject dependencies as parameters.
- Void structs when marshalling to JSON (generates `null` instead of `[]`). - Void structs when marshaling to JSON (generates `null` instead of `[]`).
### Security ### Security
@ -185,7 +185,7 @@ There are a few guidelines one should follow when using the
- When printing an error use - When printing an error use
[WithError](https://godoc.org/github.com/sirupsen/logrus#WithError). For [WithError](https://godoc.org/github.com/sirupsen/logrus#WithError). For
exmaple, `logrus.WithError(err).Error("Failed to do something")`. example, `logrus.WithError(err).Error("Failed to do something")`.
- Since we use [structured logging](#structured-json-logging) we can log - Since we use [structured logging](#structured-json-logging) we can log
fields in the context of that code path, such as the URI of the request using fields in the context of that code path, such as the URI of the request using
[`WithField`](https://godoc.org/github.com/sirupsen/logrus#WithField) or [`WithField`](https://godoc.org/github.com/sirupsen/logrus#WithField) or