mirror of
https://github.com/golang/go.git
synced 2025-05-05 23:53:05 +00:00
Updated CodeReviewComments (markdown)
parent
0fdc3a2e9a
commit
155654e370
@ -333,7 +333,7 @@ if err != nil {
|
||||
|
||||
## Initialisms
|
||||
|
||||
Words in names that are initialisms or acronyms (e.g. "URL" or "NATO") have a consistent case. For example, "URL" should appear as "URL" or "url" (as in "urlPony", or "URLPony"), never as "Url". Here's an example: ServeHTTP not ServeHttp.
|
||||
Words in names that are initialisms or acronyms (e.g. "URL" or "NATO") have a consistent case. For example, "URL" should appear as "URL" or "url" (as in "urlPony", or "URLPony"), never as "Url". As an example: ServeHTTP not ServeHttp. For identifiers with multiple initialized "words", use for example "xmlHTTPRequest" or "XMLHTTPRequest".
|
||||
|
||||
This rule also applies to "ID" when it is short for "identifier," so write "appID" instead of "appId".
|
||||
|
||||
@ -419,6 +419,8 @@ boundaries are, not to start counting lines.
|
||||
|
||||
See https://golang.org/doc/effective_go.html#mixed-caps. This applies even when it breaks conventions in other languages. For example an unexported constant is `maxLength` not `MaxLength` or `MAX_LENGTH`.
|
||||
|
||||
Also see [Initialisms](https://github.com/golang/go/wiki/CodeReviewComments#initialisms).
|
||||
|
||||
## Named Result Parameters
|
||||
|
||||
Consider what it will look like in godoc. Named result parameters like:
|
||||
|
Loading…
x
Reference in New Issue
Block a user