hoangnguyen0403-language
Installation
SKILL.md
Golang Language Standards
Priority: P0 (CRITICAL)
Guidelines
- Fmt: Run
gofmtorgoimportson save. - Naming: Use
camelCasefor internal,PascalCasefor exported. - Packages: Short, lowercase, singular, no underscores (e.g.,
net/httpnotnet_http). - Interfaces: Define where used, not where implemented. Small interfaces (1-2 methods).
- Errors: Return error as last return value. Handle immediately.
- Variables: Short names for small scope (
i,ctx), descriptive for large scope. - Slices: Prefer slices over arrays. Use
make()for capacity. - Const: Use
iotafor enums.