explaingit

nikolaydubina/go-recipes

4,485GoAudience · developerComplexity · 1/5Setup · easy

TLDR

A community-maintained cheat-sheet of Go tools and commands covering testing, profiling, code generation, linting, and more, with short examples for each task.

Mindmap

mindmap
  root((go-recipes))
    Testing
      Code coverage
      Fuzz testing
      Goroutine leak detection
    Code generation
      Enums and mocks
      DB query code
      Protobuf bindings
    Analysis
      Dependency graph
      License audit
      Call graphs
    Other topics
      Profiling
      Linting
      WebAssembly
Click or tap to explore — scroll the page freely

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

Things people build with this

USE CASE 1

Look up the exact command to visualize code coverage, run fuzz tests, or detect goroutine leaks in a Go project.

USE CASE 2

Find the right tool to generate enums, mocks, type-safe database queries, or protobuf bindings in a Go codebase.

USE CASE 3

Audit all dependency licenses in a Go module or generate a call graph to understand unfamiliar code.

Tech stack

Go

Getting it running

Difficulty · easy Time to first run · 5min

In plain English

go-recipes is a curated collection of commands, tools, and techniques for Go projects. Rather than being a library you install as a dependency, it is a reference document organized into categories covering the full development workflow. Each entry names a task, shows the tool or command that handles it, and often includes a short example or benchmark result. Testing is covered in depth. Entries show how to measure and visualize code coverage in several formats, how to run fuzz tests, how to detect goroutine memory leaks, and how to produce test reports in JUnit format. Several tools for formatting and summarizing test output are listed alongside options for automatically retrying failed tests or skipping the slowest ones. Dependency management entries cover checking which modules can be upgraded, visualizing the dependency graph as an image, auditing license types across all dependencies, and enforcing architectural layer rules. Code visualization entries include tools for generating call graphs, UML diagrams, and interactive 3D representations of a codebase. Code generation is a recurring theme. The entries show how to produce enum methods, constructors, type-safe database query code, mock implementations for testing, and protobuf bindings. Other sections address profiling, benchmarking, linting, formatting, security scanning, SQL tooling, WebAssembly builds, and publishing modules. The repository also covers cross-compilation, working with generics, integrating AI coding assistants, and less commonly documented Go features. Each recipe links to the relevant upstream tool or documentation. This is a community-maintained reference rather than a finished product. The full README is longer than what was shown.

Copy-paste prompts

Prompt 1
Using go-recipes, show me how to generate an interactive HTML code coverage report for my Go package.
Prompt 2
I need to detect goroutine leaks in my Go tests, which tool from go-recipes handles that and how do I run it?
Prompt 3
Set up golangci-lint following the go-recipes approach and add it to a GitHub Actions workflow for my project.
Prompt 4
Using go-recipes techniques, generate type-safe SQL query code from my Go database schema with sqlc.
Prompt 5
Profile a slow Go HTTP handler using the go-recipes profiling recipes and identify the bottleneck.
Open on GitHub → Explain another repo

← nikolaydubina on gitmyhub — every repo by this author, as a profile.

Verify against the repo before relying on details.