Code Style Guide
Station follows standard Go conventions with some project-specific guidelines.Go Style
Official Guidelines
Station follows the official Go style guides:- Effective Go
- Go Code Review Comments
- Uber Go Style Guide (supplementary)
Formatting
Linting
golangci-lint with these enabled linters:
gofmt- Format checkinggoimports- Import organizationgovet- Go vet checkserrcheck- Error handlingstaticcheck- Static analysisgosimple- Simplificationsineffassign- Unused assignments
Naming Conventions
Packages
Functions and Methods
Interfaces
Variables
Constants
Code Organization
File Structure
Import Grouping
Error Handling
Error Wrapping
Custom Errors
Don’t Ignore Errors
Context Usage
Concurrency
Channel Patterns
Mutex Usage
Documentation
Package Comments
Function Comments
Inline Comments
Testing Style
See the Testing Guide for detailed testing conventions.Pre-commit Checklist
Before committing:- Format code:
make fmt - Run linter:
make lint - Run tests:
make test - Check for issues:
make check(runs fmt, lint, test)
Next Steps
Development Setup
Set up your development environment
Testing
Writing and running tests

