golang-patterns

Provide Go 1.22+ backend patterns for HTTP APIs with authentication and caching.

Updated Mar 2, 2026
One-click install
npx skills add https://github.com/MassimilianoPili/claude-code-config --skill golang-patterns-massimilianopili
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: golang-patterns
Source: https://github.com/MassimilianoPili/claude-code-config/tree/main/skills/golang-patterns
Command: npx skills add https://github.com/MassimilianoPili/claude-code-config --skill golang-patterns-massimilianopili

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill provides a comprehensive set of battle-tested Go backend patterns for building robust and scalable HTTP APIs, covering authentication, data handling, and deployment.

Core Features & Use Cases

  • Modern Go HTTP Routing: Utilizes Go 1.22+ net/http ServeMux for efficient routing.
  • Authentication: Implements JWT Bearer authentication and native OIDC Keycloak integration.
  • Data Management: Demonstrates Redis caching and interaction with the Docker Engine API via Unix socket.
  • Real-time Features: Includes patterns for Server-Sent Events (SSE) and WebSocket proxying.
  • Deployment: Covers Docker Compose and multi-stage Dockerfile best practices for containerized Go applications.

Quick Start

Use the golang-patterns skill to create a new Go HTTP service for the SOL server.

Frequently Asked Questions about golang-patterns

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I implement JWT Bearer authentication with Keycloak in a Go backend?▼

Secure your Go HTTP API by implementing JWT Bearer authentication and native OIDC Keycloak integration. This validates tokens directly against Keycloak, ensuring robust authentication flows for your backend microservices without relying on external middleware.

What is the best way to structure HTTP routing in Go 1.22 for modern APIs?▼

Structure HTTP routing in Go 1.22 by leveraging the enhanced `net/http` ServeMux for efficient routing. This built-in router supports advanced pattern matching, allowing you to build modern APIs natively without importing third-party web frameworks.

How do I add Server-Sent Events and WebSocket proxying to a Go HTTP service?▼

Add Server-Sent Events (SSE) and WebSocket proxying to a Go HTTP service using established real-time communication patterns. This enables your backend to push continuous data updates and handle bidirectional streaming for connected clients.

Can I use Redis caching and Docker Engine API in a Golang microservices architecture?▼

Yes, you can use Redis caching and interact with the Docker Engine API via Unix socket within a Golang microservices architecture. These patterns facilitate efficient data caching and direct container management for your backend services.

Do I need Docker Compose to deploy a containerized Go backend application?▼

You need Docker Compose and multi-stage Dockerfiles to follow best practices for deploying a containerized Go backend application. This setup ensures optimized image sizes and orchestrates multi-container microservices environments effectively.