hdlopez/clean-architecture-golang
66.1
Adequate · 21 September 2026
282
lines of production code
Go
primary language
4
measurements over time
What this system is
This is a Go-based application implementing clean architecture principles, structured around a message domain. It exposes a REST API with ping and message endpoints, utilizing a modular design that separates concerns into API, service, and repository layers. The system manages external HTTP communication through a centralized REST client and enforces structured error handling throughout the stack.
Features
Add config module for REST client initialization
A new config module has been introduced, providing a centralized way to initialize and manage REST clients using the go-resty library. The module defines a constant for the message API client and a function to return a map of configured REST clients, allowing for future expansion to include timeouts and retry strategies for additional APIs.
config · medium confidence
Added REST client for message API with error handling
The restclient module now includes a new MessageAPI interface and implementation that wraps the go-resty HTTP client to fetch messages by ID. The change introduces a base restAPI struct that handles HTTP GET requests, parses JSON responses, and returns structured API errors for non-200 status codes or unmarshal failures. A corresponding test suite validates successful retrieval and error scenarios against a mock server.
restclient · high confidence
Initial implementation of the message domain layer
The message package introduces the core domain logic for handling messages. This includes a Message entity, a repository layer that fetches data from an external API client, and a service layer that enforces business rules (such as validating that the message ID is not empty). A corresponding test file was also added to verify the service's Get method under both success and error conditions.
message · high confidence
Initial release of the Go clean architecture example
The repository is initialized with a complete Go application structure based on clean architecture principles. This includes the main entry point (main.go) that wires up dependency injection for the API, message service, and repository layers. The project also includes configuration for linting (golangci-lint), a Makefile for running tests and the application, and a README explaining the architecture and usage. Additionally, standard repository files like .gitignore and CODE\_OF\_CONDUCT.md are added.
(repo-wide) · high confidence
Introduce API layer with message and ping controllers
The API package now includes a new API struct that manages route configuration for /ping and /messages/:id endpoints. The message controller has been updated to handle HTTP status codes and error responses more explicitly, distinguishing between known API errors and unexpected internal server errors. Additionally, a ping controller has been added to handle the /ping endpoint. The changes also include a new test file for the message controller, which verifies the correct handling of success, bad request, and internal server error scenarios.
api · high confidence
Introduce structured API error handling
Adds a new \apierror\ package that defines an \APIError\ struct containing a status code and a message. This provides a standardized way to represent API errors with specific HTTP status codes and descriptive messages, implementing the standard \error\ interface and a custom \Code()\ method for status code retrieval.
apierror · high confidence
Dependencies
Initial Go module and dependency manifest
The project now includes a go.mod and go.sum file, establishing the Go module path (github.com/hdlopez/clean-architecture-golang) and declaring dependencies such as gin v1.8.1, resty v2.7.0, and golang.org/x/text v0.3.8. This enables the project to be built and managed using standard Go tooling.
(dependencies) · high confidence
Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.
How this codebase got here
This is the PUBLIC form of this artifact. Findings are listed in full, but the details of SECURITY findings — which rule fired, in which file, on which line, and how to fix it — are deliberately withheld, and any secret-scanner results are excluded entirely. Where detail is absent here it was REMOVED FOR PUBLICATION; it is not missing from the analysis. The complete artifact is available from the repository owner.
Score
- CAI 65 → 66 (+1.5)
- Rubric changed (rubric-2026.08.19 → rubric-2026.09.15) — scores are not directly comparable.
Lenses
- Code Health 100 → 100 (+0.0)
- Architecture 69 → 69 (+0.0)
- Maturity 54 → 54 (+0.0)
- Readiness 70 → 77 (+7.0)
- Security 75 → 82 (+7.3)
- Domain Modelling 100 → 100 (+0.0)
Resolved (16)
- Coverage not included — suite not readable by the collector
- Critical CVE: [GHSA redacted] (go.mod)
- Dependency hygiene not measured — dependency manifest found but not parsed for hygiene
- High CVE: [GHSA redacted] (go.mod)
- High CVE: [GHSA redacted] (go.mod)
- High: security finding (details withheld)
- High: security finding (details withheld)
- Medium CVE: [GHSA redacted] (go.mod)
- Medium CVE: [GHSA redacted] (go.mod)
- Medium CVE: GO-2022-0969 (go.mod)
- Medium CVE: GO-2026-5024 (go.mod)
- Medium CVE: GO-2026-5970 (go.mod)
- No exposed public API
- Test reliability not included
- early-stage repository — too few commits for a meaningful bus factor
- early-stage repository — too little history to judge knowledge freshness
New (23)
- Critical CVE: [GHSA redacted] (go.mod)
- Documentation: no contributor guidance (README.md)
- Documentation: no installation or build instructions (README.md)
- Documentation: no usage examples (README.md)
- High CVE: [GHSA redacted] (go.mod)
- High CVE: [GHSA redacted] (go.mod)
- High interface indirection
- High: security finding (details withheld)
- High: security finding (details withheld)
- High: security finding (details withheld)
- Medium CVE: [GHSA redacted] (go.mod)
- Medium CVE: [GHSA redacted] (go.mod)
- Medium CVE: GO-2022-0969 (go.mod)
- Medium CVE: GO-2026-5024 (go.mod)
- Medium CVE: GO-2026-5970 (go.mod)
- Medium: security finding (details withheld)
- Medium: security finding (details withheld)
- No ADRs found
- No dependency advisory monitoring
- Outdated: github.com/gin-gonic/gin
- …and 3 more
Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.
Survey your own repository
hdlopez/clean-architecture-golang was measured the same way every project in this corpus was: the same rubric, at a pinned commit, with the result published in full. Point a surveyor at a repository you know and see whether you agree with it.
About this page
- The score is its most recent published measurement, taken on 21 September 2026 at a pinned commit. It is not a live figure and does not change until the project is measured again.
- Measured at commit 2c8f0098e6cad1f9dc74cea659ad1589466c36de — the exact code this score is about.
- Scored under rubric-2026.09.15 — the same rubric and the same method as every other entry in this index.
- Measured by watchdog.canine.dev using codehealth-analyzer preprod-fa71c66cabd8.