-
-
Notifications
You must be signed in to change notification settings - Fork 611
Golang style guide
Roland Bracewell Shoemaker edited this page Aug 23, 2016
·
2 revisions
The code base generally follows the rules outlined in Effective Go as well as a few other guidelines that are specific to Boulder internals.
- If a service needs to report metrics it should use a
metrics.Scope
. If a service has child services which also require their own specificmetrics.Scope
they should create a new one in their constructor from the parent usingscope.NewScope(...)
instead of blindly using the scope passed in by the caller.
- If a request or response body needs to be read from a
io.LimitedReader
should be used to avoid loading excessive data into memory.