diff options
author | Evan Read <eread@gitlab.com> | 2019-03-27 04:26:26 +0000 |
---|---|---|
committer | Evan Read <eread@gitlab.com> | 2019-03-27 04:26:26 +0000 |
commit | 4fde1ba7d0338c4030f8f3a5a49c9a9777d57dfd (patch) | |
tree | 188fa6c69eac7fcb4d6b2278fb1fdff6fe13f43e | |
parent | 81807d53bf030e04e779eb1a3ef4ca611fa5892e (diff) | |
parent | 66dccb7fa80a5b66d6798907d76b74930af97b88 (diff) | |
download | gitlab-ce-4fde1ba7d0338c4030f8f3a5a49c9a9777d57dfd.tar.gz |
Merge branch 'docs-update-golang-docs-theoretick' into 'master'
Update go guidelines, fix some minor typos
See merge request gitlab-org/gitlab-ce!26562
-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 |