What is Go Template?
Go Template is an opinionated, production-ready project template designed specifically for scraper, bot, and service workloads. It provides a complete foundation for building robust Go applications without starting from scratch. Instead of spending days configuring infrastructure and boilerplate, you can scaffold a new project in seconds and start building your domain logic immediately.Who is it for?
Go Template is ideal for developers building:- Web scrapers that need TLS fingerprinting and proxy rotation
- Bot applications requiring concurrent task processing
- API services with PostgreSQL persistence
- Background workers with retry logic and state management
Key Features
Production-Ready Infrastructure
TLS Fingerprinting
HTTP client with customizable TLS/HTTP2 fingerprints to mimic real browsers
Bounded Concurrency
Worker pool primitives for controlled parallel processing via errgroup
Exponential Backoff
Retry logic with jitter for graceful transient error recovery
PostgreSQL Support
Type-safe database queries with sqlc and goose migrations
Optional Packages
Go Template uses an interactive setup wizard that lets you choose exactly what you need:- HTTP Client - TLS fingerprinting, proxy support, cookie management, HTTP/2 control
- Worker Pool - Bounded concurrency primitives for parallel processing
- Retry - Exponential backoff with full jitter
- State - File-backed JSON persistence with cross-platform file locking
- Cycle - Thread-safe round-robin file rotator
- Fake Data - Helpers for generating test data
Docker & Development
- Multi-stage Dockerfile optimized for Alpine Linux
- Docker Compose with hot reload via
docker compose watch - Local development with
make dev - Full test suite with race detector
Database Management
- PostgreSQL connection pooling with pgx
- Type-safe queries generated by sqlc
- Migration management via goose
- Optional: Use Docker postgres or bring your own database
Project Philosophy
Batteries included, but removable. Go Template ships with everything you might need, but the interactive setup wizard strips out what you don’t. This means:- No unused dependencies in your final project
- Clean codebase tailored to your needs
- Production-ready defaults that you can customize
Go Template requires Go 1.26+ for the latest generics and standard library features.
What’s Included
The template provides a complete project structure:Quick Example
Here’s what a typical service looks like with Go Template:Next Steps
Quick Start
Scaffold your first project in under 2 minutes
Setup Guide
Learn about the interactive setup wizard
