Go Style: Difference between revisions
Jump to navigation
Jump to search
Line 9: | Line 9: | ||
The [[Go_Language_Modularization#Standard_library|Go standard library]] is a good source of code examples, comments and style. | The [[Go_Language_Modularization#Standard_library|Go standard library]] is a good source of code examples, comments and style. | ||
=Identifiers= | =<span id='Identifiers'></span>Naming= | ||
{{External|https://google.github.io/styleguide/go/guide#mixedcaps}} | {{External|https://google.github.io/styleguide/go/guide#mixedcaps}} | ||
[[Go_Language#Identifiers_.28Names.29|Identifiers]] should use camel case: <code>SomeColor</code> or <code>someColor</code>. Do not use snake case (<code>some_color</code>). | [[Go_Language#Identifiers_.28Names.29|Identifiers]] should use camel case: <code>SomeColor</code> or <code>someColor</code>. Do not use snake case (<code>some_color</code>). |
Revision as of 02:16, 6 September 2023
External
- https://google.github.io/styleguide/go/
- https://go.dev/doc/effective_go
- https://github.com/golang/go/wiki/CodeReviewComments
Internal
Overview
The Go standard library is a good source of code examples, comments and style.
Naming
Identifiers should use camel case: SomeColor
or someColor
. Do not use snake case (some_color
).