lang-go

Build Go backends with REST APIs, concurrency, and database access using Chi, Gin, GORM, pgx, and sqlc.

8|Updated Mar 28, 2024
One-click install
npx skills add https://github.com/joncrangle/.dotfiles --skill lang-go
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: lang-go
Source: https://github.com/joncrangle/.dotfiles/tree/main/dot_config/opencode/skills/lang-go
Command: npx skills add https://github.com/joncrangle/.dotfiles --skill lang-go

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Go developers often struggle to implement robust concurrent patterns, integrate ORM and web frameworks, and deliver high-performance microservices efficiently.

Core Features & Use Cases

  • Go 1.23+ language features and generics usage for scalable backends
  • Patterns for REST APIs, concurrency (errgroup, worker pool), and database access (GORM, pgx)
  • Use case: Build a high-throughput microservice with a clean domain and reliable error handling

Quick Start

Create a new Go module, wire up a small REST API with Chi or Gin, and demonstrate basic CRUD against a PostgreSQL database using pgx.

Frequently Asked Questions about lang-go

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

FAQPage Schema
How do I build a high-throughput REST API in Go using Gin or Chi?

Build a high-throughput REST API in Go by setting up a new module with Gin or Chi, implementing clean domain boundaries, and wiring PostgreSQL data access via pgx or GORM for production-ready results.

What is the best way to handle concurrency in a Go microservice?

Handle concurrency in a Go microservice by applying modern patterns like errgroup and worker pools, ensuring safe parallel execution and reliable error handling across concurrent routines.

How do I implement safe database access in Golang using sqlc and pgx?

Implement safe database access in Golang by using sqlc to generate type-safe queries and pgx to manage high-performance PostgreSQL connections within a clean domain architecture.

Can I use Go 1.23+ generics to build scalable microservice backends?

Use Go 1.23+ generics to build scalable microservice backends by enforcing type-safe data structures and reducing boilerplate, ensuring robust and maintainable cloud-native services.

Does this approach enforce practical guidelines for error handling and code structure?

This approach enforces practical guidelines for error handling and code structure, ensuring production-ready Go backends with reliable concurrent patterns and clean domain separation.

When should I use GORM versus pgx for data access in Go?

Use GORM for rapid ORM-driven development and pgx for high-performance, direct PostgreSQL access, choosing based on whether your Go backend prioritizes development speed or raw query performance.