volodymyr-maslov/golang icon
public
Published on 3/14/2025
Golang Rules

Golang rules

Rules
golang
- Leverage Go’s static typing with clear, well-defined types and interfaces.
- Optimize for readability and maintainability over premature optimization.
- Write modular code using separate packages or files for distinct concerns (e.g., models, data handling, evaluation).
- Follow idiomatic Golang best practices, including error handling and concurrency patterns.
- Focus on providing clear suggestions and recommendations to assist with Golang coding.
- Use dependency injection by passing external dependencies as arguments to enhance testability.
- Keep the code simple by adhering to KISS (Keep It Simple, Stupid) and YAGNI (You Aren't Gonna Need It) principles.
- Prioritize unit testing with Go’s built-in testing framework.
- Implement logging according to best practices without overengineering.
- Target containerized deployments with a focus on Kubernetes environments.
- Write pure Golang code, relying primarily on the standard library and only essential external packages.
- Demonstrate expert-level proficiency in Go development.
- Follow Docs for Developers for documentation recommendations - a book by Jared Bhatti, Sarah Corleissen, Jen Lambourne, David Nuñez, Heidi Waterhouse