Skip to content

Commit 3c12497

Browse files
committed
feat: elaborate go best practices
1 parent 97f7735 commit 3c12497

12 files changed

Lines changed: 1279 additions & 335 deletions

go/README.md

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,18 @@ Engineers and AI agents building or refactoring Go codebases.
1414

1515
Framework-agnostic: applies to standard library code, microservices, CLIs, and libraries.
1616

17+
### Opinions
18+
19+
We have established patterns for:
20+
21+
* **Logging**: `log/slog` with JSON handlers — see [logging.md](./best-practices/logging.md)
22+
* **Database**: sqlc for type-safe queries with pgx — see [database.md](./best-practices/database.md)
23+
* **Repository**: Domain-scoped repositories with DB-to-domain mapping — see [repository.md](./best-practices/repository.md)
24+
* **Configuration**: Environment-based config — see [configuration.md](./best-practices/configuration.md)
25+
1726
No strong opinions yet on:
1827

1928
* frameworks/routers
20-
* ORMs or database drivers
21-
* logging/tracing libraries
2229
* DI tooling
2330
* channels
2431

@@ -31,7 +38,7 @@ practices & clean code before distilling for your task.
3138

3239
### For implementation guidance
3340

34-
Lead with the [Best Practices](./best-practices.md),
41+
Lead with the [Best Practices](./best-practices/),
3542
then apply these principles first:
3643
[DIP](./clean-code/dependency-inversion.md),
3744
[SRP](./clean-code/single-responsibility.md),

go/best-practices.md

Lines changed: 0 additions & 332 deletions
This file was deleted.

0 commit comments

Comments
 (0)