Code Style
General
- Use idiomatic Go patterns and handle errors explicitly.
- Prefer the standard library where possible.
- Follow the official Go doc comment format: https://go.dev/doc/comment
Character Set
Stay within the ASCII range (U+0000-U+007F) in all source files and comments. No Unicode box-drawing characters, arrows, dashes, or other decorative glyphs.
Comments
- Doc comments go directly above the declaration with no blank line between comment and declaration.
- Every exported symbol must have a doc comment starting with the symbol name.
- Use
[brackets]to reference other symbols and packages (they become hyperlinks on pkg.go.dev). - Use
// # Headingfor sections within a long comment block.
What to Avoid
- Decorative section dividers such as
// -- Title --or// == Title == - Starting type/func comments with a verb instead of the symbol name (
"Fetches..."vs"WorkerActor fetches...") - Inline comments that restate what the code already clearly shows