flâneur — a map of the web's best reading

styleguide | Style guides for Google-originated open-source projects

google.github.io · 2,992 words · saved by 1 readers

Note: This is part of a series of documents that outline Go Style at Google. This document is normative and canonical. See the overview for more information. There are a few overarching principles that summarize how to think about writing readable Go code. The following are attributes of readable code, in order of importance: The core goal of readability is to produce code that is clear to the reader. Clarity is primarily achieved with effective naming, helpful commentary, and efficient code organization. Clarity is to be viewed through the lens of the reader, not the author of the code. It is more important that code be easy to read than easy to write. Clarity in code has two distinct facets: Go is designed such that it should be relatively straightforward to see what the code is doing. In cases of uncertainty or where a reader may require prior knowledge in order to understand the code, it is worth investing time in order to make the code’s purpose clearer for future readers. For exa

styleguide | Style guides for Google-originated open-source projects styleguide Go Style Guide https://google.github.io/styleguide/go/guide Overview | Guide | Decisions | Best practices Note: This is part of a series of documents that outline Go Style at Google. This document is normative and canonical . See the overview for more information. Style principles There are a few overarching principles that summarize how to think about writing readable Go code. The following are attributes of readable code, in order of importance: Clarity : The code’s purpose and rationale is clear to the reader. S

Explore this link on the map →

related reading