diff options
author | Lucas Charles <me@lucascharles.me> | 2019-03-27 07:26:25 +0300 |
---|---|---|
committer | Evan Read <eread@gitlab.com> | 2019-03-27 07:26:25 +0300 |
commit | 66dccb7fa80a5b66d6798907d76b74930af97b88 (patch) | |
tree | 188fa6c69eac7fcb4d6b2278fb1fdff6fe13f43e /doc/development/go_guide | |
parent | 81807d53bf030e04e779eb1a3ef4ca611fa5892e (diff) |
Update go guidelines, fix some minor typos
Diffstat (limited to 'doc/development/go_guide')
-rw-r--r-- | doc/development/go_guide/index.md | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/doc/development/go_guide/index.md b/doc/development/go_guide/index.md index 7fd41c5e01f..6dcade3bb51 100644 --- a/doc/development/go_guide/index.md +++ b/doc/development/go_guide/index.md @@ -26,7 +26,7 @@ Reviewers and maintainers should pay attention to: - `defer` functions: ensure the presence when needed, and after `err` check. - 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 @@ -185,7 +185,7 @@ There are a few guidelines one should follow when using the - When printing an error use [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 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 |