mirror of
https://github.com/gohugoio/hugo.git
synced 2026-08-24 15:28:54 +00:00
606 B
606 B
- Brevity is good.
- Assume that the maintainers and readers of the code you write are Go experts:
- Don't use comments to explain the obvious.
- Use self-explanatory variable and function names.
- Use short variable names when the context is clear.
- Never export symbols that's not needed outside of the package.
- Avoid global state at (almost) all cost.
- This is a project with a long history; assume that a similiar problem has been solved before, look hard for helper functions before creating new ones.
- Use
go test ./somepackage/...when iterating. - Use
mage checkwhen you're done.