This page explains preferences in regard to the style of Go code written for the DAOS (and other related) project(s).
**Please discuss changes before editing this page**, even _minor_ ones. Many people have opinions and this is not the place for edit wars.
Points of note
Clarifications of rules that are already covered in the official style guide.
Run goimports, a superset of `gofmt` which additionally adds (and removes) import lines as necessary. gofmt automatically fixes the majority of mechanical style issues. Almost all Go code in the wild uses `gofmt`. The rest of this document addresses non-mechanical style points. use-linters give some explanation of the importance of running code through linters before committing.
Keep function and variable names as short as possible, C-like function names are preferred where possible in mixed-caps . Attempt to keep function and variable names to less than 20 characters and less than 5 words.
Use of comments is encouraged, comments should be used to describe the intent of code when it is not obvious. See commentary.
Using Mocks In Tests
Deviations from rules that are already covered in the official style guide.