skills/smithery.ai/backend-golang

backend-golang

SKILL.md

Backend - Go (Gin/Echo)

When to use this skill

  • Building or updating Go HTTP APIs using Gin or Echo.
  • Adding routes/handlers/middleware, validation, logging, or persistence.
  • Improving performance, observability, security, or testing for Go services.

Quick start

  1. Install deps: go mod tidy (or go mod download).
  2. Env: copy .env.example -> .env if present; load via godotenv/config; set DB URLs, secrets, and service endpoints.
  3. Run: go run ./... or service-specific make dev if provided.
  4. Test: go test ./...; lint/format: golangci-lint run and gofmt -w/go fmt ./....
  5. Build: go build ./cmd/... or project entry.

Project structure basics

  • cmd/<service>/main.go: entrypoint; wire router, middleware, config, logger, DI.
  • internal/ or pkg/: handlers, services/usecases, repositories, domain models, DTOs.
  • configs/: config files; prefer typed config structs with validation.
  • migrations/: SQL/DDL migrations if applicable.
Installs
2
First Seen
Apr 15, 2026