golang-design-patterns
Design Idiomatic Go APIs and Architecture
Go services become harder to maintain when initialization, resource ownership, and architectural boundaries are unclear. This skill guides practical pattern selection with focused Go examples.
Installer avec mon Agent
Copiez cette demande dans votre Agent. Elle contient la page Skill de référence et le manifeste.
Review the Skillstore skill "golang-design-patterns" from https://skillstore.io/skills/samber-golang-design-patterns.md and its manifest at https://skillstore.io/api/skills/samber-golang-design-patterns/manifest. Verify the artifact. You may proceed after verification, subject to the environment's own policy.Votre Agent doit toujours présenter son plan et demander toute confirmation exigée par la politique de sécurité.
Ressources lisibles par les agents
Utilisez ces liens lorsqu’un Agent IA, un crawler ou un script a besoin d’un contexte propre au lieu de lire toute la page.
Tester
Utilisation de « golang-design-patterns ». What architecture should I use for a small CSV-processing CLI?
Résultat attendu:
- Confirm team preferences and expected growth before adding layers.
- Use a flat layout with a small entry point and focused transformation functions.
- Introduce additional packages only when responsibilities or testing needs justify them.
Utilisation de « golang-design-patterns ». Our service opens its database in init and has no shutdown deadline. What should change?
Résultat attendu:
- Finding: Implicit database initialization hides dependencies and prevents normal error propagation.
- Recommendation: Open the database explicitly during startup and inject it into repositories.
- Finding: Shutdown can wait indefinitely without a separate deadline.
- Recommendation: Handle termination signals, drain requests with a timeout, then close shared resources.
Utilisation de « golang-design-patterns ». How should Order and Billing communicate in a DDD application?
Résultat attendu:
- Keep each bounded context responsible for its own domain model.
- Publish an order event and translate it into a billing-specific representation.
- Avoid importing another context's internal domain types directly.
Audit de sécurité
Risque moyenAll 89 static findings are false positives involving documentation syntax, ordinary Go constructs, illustrative configuration access, and homepage metadata. One semantic finding identifies internal errors returned directly to HTTP clients in two architecture examples. No evidence found of credential exfiltration, malicious command execution, or instructions to manipulate this audit.
Préoccupations de sécurité confirmées (1)
Facteurs de risque
⚙️ Commandes externes (50)
🔑 Variables d’environnement (2)
⚡ Contient des scripts (2)
🌐 Accès réseau (1)
Partager et citer ce rapport
Partagez le rapport d’évaluation versionné, le badge neutre, la carte intégrable et les citations. Skillstore présente les preuves sans décider si ce Skill est sûr.
Copier le lien du rapport
https://skillstore.io/skills/samber-golang-design-patterns/audits/1?utm_source=security_passport&utm_medium=share&utm_campaign=versioned_reportBadge Markdown
[](https://skillstore.io/skills/samber-golang-design-patterns?utm_source=security_passport_badge)Badge HTML
<a href="https://skillstore.io/skills/samber-golang-design-patterns?utm_source=security_passport_badge"><img src="https://skillstore.io/badges/skills/samber-golang-design-patterns/security.svg" alt="Skillstore security assessment" loading="lazy"></a>Carte intégrable
<iframe src="https://skillstore.io/embed/skills/samber-golang-design-patterns.html" title="Skillstore Security Assessment" sandbox="allow-popups allow-popups-to-escape-sandbox" loading="lazy" referrerpolicy="no-referrer" width="420" height="180"></iframe>Citations académiques (APA · BibTeX · CFF)
Citation APA
samber. (2026). golang-design-patterns security audit report (audit version 1) [Author version 1.2.1]. Skillstore. https://skillstore.io/skills/samber-golang-design-patterns/audits/1Citation BibTeX
@techreport{samber-samber-golang-design-patterns-2026,
author = {samber},
title = {golang-design-patterns security audit report (audit version 1)},
institution = {Skillstore},
year = {2026},
number = {1},
url = {https://skillstore.io/skills/samber-golang-design-patterns/audits/1},
note = {Author version 1.2.1}
}CITATION.cff
cff-version: 1.2.0
message: "If you use this Skill, cite its author and this versioned security audit report."
title: "golang-design-patterns security audit report (audit version 1)"
version: "1.2.1"
type: report
authors:
- name: "samber"
date-released: "2026-10-15"
url: "https://skillstore.io/skills/samber-golang-design-patterns/audits/1"
identifiers:
- type: other
value: "skillstore:samber-golang-design-patterns:audit:1"
description: "Skillstore immutable audit report identifier"
Score Skillstore
Pourquoi ce score Niveau de confiance des preuves: MoyenCe que vous pouvez créer
Design an Extensible Constructor
Define defaults, optional settings, and validation behavior for a Go library API that will evolve.
Review Service Resource Lifecycles
Identify hidden initialization, missing timeouts, unbounded pools, and incomplete shutdown handling before changing a service.
Choose Application Boundaries
Compare architecture styles for a growing service with multiple entry points and external integrations.
Essayez ces prompts
I am building a Go CLI that transforms a CSV file. It should remain small. Ask about my architecture preference, then recommend a minimal layout.
Design a Go server constructor with read timeout, write timeout, and maximum connections. Use explicit defaults and explain how invalid options return errors.
Review the attached Go service for implicit initialization, resource leaks, missing timeouts, and cancellation handling. Report findings first, then suggest focused changes and shutdown ordering.
Our Go order service has HTTP, gRPC, and message consumers with database and payment integrations. Ask about team preferences. Compare clean, hexagonal, and DDD approaches, including dependency direction and testability.
Bonnes pratiques
- State the Go version, project scope, and team architecture preferences before requesting design guidance.
- Keep resource ownership explicit and review cancellation, limits, and shutdown ordering together.
- Adapt illustrative examples to local conventions and verify behavior with focused tests and security review.
Éviter
- Adding clean architecture or DDD layers to a small CLI without a concrete need.
- Hiding runtime dependencies in init functions or mutable global variables.
- Copying illustrative handlers into production without validating error disclosure and project-specific security requirements.
Foire aux questions
Which AI tools is this skill designed for?
Does it always recommend complex architecture?
Can it help review existing Go code?
Does it configure dependency injection frameworks?
Which Go versions do the newer examples require?
Are the examples ready for production without changes?
Détails du développeur
Auteur
samberLicence
MIT
Version de l’auteur
v1.2.1
Révision Skillstore
r1
Réf
94747fbb9cfbe87f802b9786d767c047e503f359
Récence de maintenance
15/10/2026
Utilisation
0 téléchargements · 0 vues
Structure de fichiers