Skip to content
Snippets Groups Projects
Commit 4fde1ba7 authored by Evan Read's avatar Evan Read
Browse files

Merge branch 'docs-update-golang-docs-theoretick' into 'master'

Update go guidelines, fix some minor typos

See merge request gitlab-org/gitlab-ce!26562
parents 81807d53 66dccb7f
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -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
 
Loading
Loading
@@ -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
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment