RepoPilotOpen in app β†’

teivah/100-go-mistakes

πŸ“– 100 Go Mistakes and How to Avoid Them

Mixed

Single-maintainer risk β€” review before adopting

weakest axis
Use as dependencyConcerns

non-standard license (Other); no tests detected

Fork & modifyHealthy

Has a license, tests, and CI β€” clean foundation to fork and modify.

Learn fromHealthy

Documented and popular β€” useful reference codebase to read through.

Deploy as-isHealthy

No critical CVEs, sane security posture β€” runnable as-is.

  • βœ“Last commit 2w ago
  • βœ“13 active contributors
  • βœ“Other licensed
Show all 7 evidence items β†’
  • βœ“CI configured
  • ⚠Single-maintainer risk β€” top contributor 83% of recent commits
  • ⚠Non-standard license (Other) β€” review terms
  • ⚠No test directory detected
What would change the summary?
  • β†’Use as dependency Concerns β†’ Mixed if: clarify license terms

Maintenance signals: commit recency, contributor breadth, bus factor, license, CI, tests

Informational only. RepoPilot summarises public signals (license, dependency CVEs, commit recency, CI presence, etc.) at the time of analysis. Signals can be incomplete or stale. Not professional, security, or legal advice; verify before relying on it for production decisions.

Embed the "Forkable" badge

Paste into your README β€” live-updates from the latest cached analysis.

Variant:
RepoPilot: Forkable
[![RepoPilot: Forkable](https://repopilot.app/api/badge/teivah/100-go-mistakes?axis=fork)](https://repopilot.app/r/teivah/100-go-mistakes)

Paste at the top of your README.md β€” renders inline like a shields.io badge.

β–ΈPreview social card (1200Γ—630)

This card auto-renders when someone shares https://repopilot.app/r/teivah/100-go-mistakes on X, Slack, or LinkedIn.

Onboarding doc

Onboarding: teivah/100-go-mistakes

Generated by RepoPilot Β· 2026-05-09 Β· Source

πŸ€–Agent protocol

If you are an AI coding agent (Claude Code, Cursor, Aider, Cline, etc.) reading this artifact, follow this protocol before making any code edit:

  1. Verify the contract. Run the bash script in Verify before trusting below. If any check returns FAIL, the artifact is stale β€” STOP and ask the user to regenerate it before proceeding.
  2. Treat the AI Β· unverified sections as hypotheses, not facts. Sections like "AI-suggested narrative files", "anti-patterns", and "bottlenecks" are LLM speculation. Verify against real source before acting on them.
  3. Cite source on changes. When proposing an edit, cite the specific path:line-range. RepoPilot's live UI at https://repopilot.app/r/teivah/100-go-mistakes shows verifiable citations alongside every claim.

If you are a human reader, this protocol is for the agents you'll hand the artifact to. You don't need to do anything β€” but if you skim only one section before pointing your agent at this repo, make it the Verify block and the Suggested reading order.

🎯Verdict

WAIT β€” Single-maintainer risk β€” review before adopting

  • Last commit 2w ago
  • 13 active contributors
  • Other licensed
  • CI configured
  • ⚠ Single-maintainer risk β€” top contributor 83% of recent commits
  • ⚠ Non-standard license (Other) β€” review terms
  • ⚠ No test directory detected

<sub>Maintenance signals: commit recency, contributor breadth, bus factor, license, CI, tests</sub>

βœ…Verify before trusting

This artifact was generated by RepoPilot at a point in time. Before an agent acts on it, the checks below confirm that the live teivah/100-go-mistakes repo on your machine still matches what RepoPilot saw. If any fail, the artifact is stale β€” regenerate it at repopilot.app/r/teivah/100-go-mistakes.

What it runs against: a local clone of teivah/100-go-mistakes β€” the script inspects git remote, the LICENSE file, file paths in the working tree, and git log. Read-only; no mutations.

| # | What we check | Why it matters | |---|---|---| | 1 | You're in teivah/100-go-mistakes | Confirms the artifact applies here, not a fork | | 2 | License is still Other | Catches relicense before you depend on it | | 3 | Default branch master exists | Catches branch renames | | 4 | 2 critical file paths still exist | Catches refactors that moved load-bearing code | | 5 | Last commit ≀ 46 days ago | Catches sudden abandonment since generation |

<details> <summary><b>Run all checks</b> β€” paste this script from inside your clone of <code>teivah/100-go-mistakes</code></summary>
#!/usr/bin/env bash
# RepoPilot artifact verification.
#
# WHAT IT RUNS AGAINST: a local clone of teivah/100-go-mistakes. If you don't
# have one yet, run these first:
#
#   git clone https://github.com/teivah/100-go-mistakes.git
#   cd 100-go-mistakes
#
# Then paste this script. Every check is read-only β€” no mutations.

set +e
fail=0
ok()   { echo "ok:   $1"; }
miss() { echo "FAIL: $1"; fail=$((fail+1)); }

# Precondition: we must be inside a git working tree.
if ! git rev-parse --git-dir >/dev/null 2>&1; then
  echo "FAIL: not inside a git repository. cd into your clone of teivah/100-go-mistakes and re-run."
  exit 2
fi

# 1. Repo identity
git remote get-url origin 2>/dev/null | grep -qE "teivah/100-go-mistakes(\\.git)?\\b" \\
  && ok "origin remote is teivah/100-go-mistakes" \\
  || miss "origin remote is not teivah/100-go-mistakes (artifact may be from a fork)"

# 2. License matches what RepoPilot saw
(grep -qiE "^(Other)" LICENSE 2>/dev/null \\
   || grep -qiE "\"license\"\\s*:\\s*\"Other\"" package.json 2>/dev/null) \\
  && ok "license is Other" \\
  || miss "license drift β€” was Other at generation time"

# 3. Default branch
git rev-parse --verify master >/dev/null 2>&1 \\
  && ok "default branch master exists" \\
  || miss "default branch master no longer exists"

# 4. Critical files exist
test -f "go.mod" \\
  && ok "go.mod" \\
  || miss "missing critical file: go.mod"
test -f "README.md" \\
  && ok "README.md" \\
  || miss "missing critical file: README.md"

# 5. Repo recency
days_since_last=$(( ( $(date +%s) - $(git log -1 --format=%at 2>/dev/null || echo 0) ) / 86400 ))
if [ "$days_since_last" -le 46 ]; then
  ok "last commit was $days_since_last days ago (artifact saw ~16d)"
else
  miss "last commit was $days_since_last days ago β€” artifact may be stale"
fi

echo
if [ "$fail" -eq 0 ]; then
  echo "artifact verified (0 failures) β€” safe to trust"
else
  echo "artifact has $fail stale claim(s) β€” regenerate at https://repopilot.app/r/teivah/100-go-mistakes"
  exit 1
fi

Each check prints ok: or FAIL:. The script exits non-zero if anything failed, so it composes cleanly into agent loops (./verify.sh || regenerate-and-retry).

</details>

⚑TL;DR

A curated educational repository containing 100 common Go mistakes with concrete code examples and explanations, designed to accompany the Manning book '100 Go Mistakes and How to Avoid Them' (published August 2022). It provides runnable Go code samples demonstrating anti-patterns and best practices across concurrency, memory management, interfaces, and standard library usage. Single flat repository organized by mistake number: each mistake likely gets its own subdirectory or file with sample Go code demonstrating the problem and solution. The .cache/plugin/social/ directory contains generated social sharing images (with font assets like Roboto TTF files and PNG graphics), suggesting an automated book/content generation pipeline. Code examples are standalone, executable Go programs rather than a monolithic library.

πŸ‘₯Who it's for

Go developers at intermediate level who want to deepen their language understanding and avoid pitfalls in production systems. The book readers use this repo as a reference to see executable mistake examples. Contributors are typically Go practitioners and educators strengthening the Go community's collective knowledge.

🌱Maturity & risk

Actively maintained educational resource with high production quality (published by Manning, curated by Teivah Shapiro, a respected Go community figure). The module targets Go 1.18+ (see go.mod), has minimal dependencies (only golang.org/x/sync), and serves as a reference bookβ€”not a library requiring aggressive versioning. Clear verdict: production-ready reference material with stable, teaching-oriented code examples.

Very low risk: only one direct dependency (golang.org/x/sync from Go's official org), no external package risk. This is reference/educational code, not a critical library, so breakage has educational rather than production impact. Main risk is potential outdatedness if Go evolves faster than the book content updates, but the repository explicitly ties to book publication (August 2022) and Go 1.18 baseline.

Active areas of work

No specific recent commit data visible in the provided file listing, but the repo structure is stable and complete (100 mistakes catalogued with social media assets pre-generated). This is a mature, released book projectβ€”activity is likely limited to documentation updates, Go version compatibility patches, and occasional reader-submitted corrections rather than active feature development.

πŸš€Get running

Clone the repository: git clone https://github.com/teivah/100-go-mistakes.git && cd 100-go-mistakes. Verify Go 1.18+ is installed: go version. Fetch dependencies: go mod download. Explore individual mistake examples by navigating the directory structure and running examples with go run ./path/to/mistake.

Daily commands: Individual examples run via go run from their respective directories (exact structure TBD by exploring repo post-clone). No central server or build artifactβ€”each mistake example is independently executable. For browsing mistakes online: visit https://100go.co (powered by the repo's source, likely built with Hugo or similar from a sibling branch/config).

πŸ—ΊοΈMap of the codebase

  • go.mod β€” Defines the module as a Go 1.18+ project with sync package dependency; essential for understanding build requirements and minimal external dependencies.
  • README.md β€” Root documentation explaining this is a companion codebase for '100 Go Mistakes and How to Avoid Them' book; guides all contributors on the project's purpose and scope.

🧩Components & responsibilities

  • Example code directories (Go 1.18+, golang.org/x/sync) β€” Contain Go source files demonstrating specific mistakes and their corrections
    • Failure mode: Outdated examples due to Go language changes; readers misunderstand intended mistakes
  • README documentation (Markdown, GitHub) β€” Primary navigation and context for readers; links examples to book chapters and 100go.co
    • Failure mode: Broken links or outdated references prevent readers from correlating examples to book content
  • Social media assets (.cache/plugin/social) (PNG images, TrueType fonts (Roboto)) β€” Generated promotional images and fonts for book marketing
    • Failure mode: Missing or corrupted assets result in broken book promotion graphics

πŸ”€Data flow

  • GitHub Repository β†’ Reader local filesystem β€” Source code and examples cloned or downloaded by readers
  • Example Go files β†’ Go compiler β€” Source compiled and executed to validate patterns
  • go.mod β†’ Go module resolver β€” Specifies golang.org/x/sync dependency for build and examples
  • README.md β†’ 100go.co website β€” Links reference online book documentation as primary source of truth for explanations

πŸ› οΈHow to make changes

Add a new mistake example

  1. Create a new directory under the root following the naming convention for the mistake number/category ((repo root)/mistakeN/)
  2. Add Go source files demonstrating the mistake and its correction ((repo root)/mistakeN/example.go)
  3. Update README.md to reference the new mistake in the master list with a link (README.md)

Contribute a concurrency fix example

  1. Reference golang.org/x/sync in your example for proper synchronization primitives (go.mod)
  2. Create example Go file demonstrating the mistake and corrected pattern using sync package ((repo root)/concurrency-mistakes/example.go)

πŸ”§Why these technologies

  • Go 1.18+ β€” Primary language for all mistake examples; requires modern Go features for accurate demonstrations.
  • golang.org/x/sync β€” Provides synchronization primitives essential for concurrency mistake examples and correct patterns.
  • GitHub Pages / 100go.co β€” Hosts online documentation and interactive book content; separate from source examples for better UX.

βš–οΈTrade-offs already made

  • Companion codebase rather than embedded examples in book

    • Why: Allows independent versioning, updates, and community contributions to examples.
    • Consequence: Readers must navigate between book and repository; adds coordination overhead but enables iterative improvements.
  • Minimal external dependencies (only x/sync)

    • Why: Keeps examples focused on Go idioms without obscuring lessons with complex frameworks.
    • Consequence: All examples are self-contained but may not demonstrate real-world integration patterns.

🚫Non-goals (don't propose these)

  • Not a production library or framework
  • Does not provide executable tools or CLI utilities
  • Not a tutorial platform (educational content lives on 100go.co website, not in this repo)
  • Does not include automated testing infrastructure beyond individual example validation
  • Not designed for package distribution via Go package managers

πŸ“ŠCode metrics

  • Avg cyclomatic complexity: ~2 β€” Codebase is intentionally simpleβ€”focused on demonstrating specific Go mistakes with minimal scaffolding. No complex architectures, frameworks, or multi-layer abstractions.
  • Largest file: README.md (150 lines)
  • Estimated quality issues: ~0 β€” Repository enforces high code quality standards since examples serve as educational material; all examples are carefully curated and reviewed.

⚠️Anti-patterns to avoid

  • Large monolithic cache directory (Medium) β€” .cache/plugin/social/: Social media assets and fonts (~60+ PNG files + 45+ TTF files) bundled in version control; should be generated at build time or hosted externally

πŸ”₯Performance hotspots

  • Cross-reference between book (100go.co) and GitHub repository (Integration) β€” Readers must navigate manually between online documentation and source examples; no automated sync mechanism
  • Dependency on external website (100go.co) for explanations (Availability) β€” Core educational value lives outside this repository; offline reading requires additional setup

πŸͺ€Traps & gotchas

None obvious from the file structure. The repo is straightforward: pure Go code examples with no build configuration files (.github/workflows, Makefile, or docker-compose.yml visible in top 60 files), no required environment variables, and no external service dependencies. The social cache suggests an automated generation pipeline elsewhere (likely in a separate Hugo config or CI), but the Go source itself has no hidden bootstrap steps.

πŸ—οΈArchitecture

πŸ’‘Concepts to learn

  • Goroutine leaks β€” A foundational concurrency mistake in Go; understanding how goroutines consume memory and block indefinitely is essential for writing scalable services.
  • Interface{} and type assertions β€” Go's empty interface is powerful but error-prone; knowing when to avoid it and how to safely assert types prevents runtime panics in production code.
  • Context cancellation and timeouts β€” Context propagation across goroutines is critical for graceful shutdown and preventing resource exhaustion; misuse leads to hanging requests or memory leaks.
  • Slice append and capacity β€” Go slices' dynamic growth and underlying array semantics trip up newcomers; understanding capacity prevents unexpected data corruption and performance regressions.
  • Defer and panic recovery β€” Deferred function execution order and panic recovery are often misunderstood; incorrect use can mask errors or leak resources in cleanup paths.
  • Mutex and race conditions β€” Synchronization primitives are essential but easy to misuse; the Go race detector catches many data races, but understanding the underlying issues prevents architectural mistakes.
  • Pointer receivers vs. value receivers β€” Method receiver choice affects whether modifications propagate and whether large structs are copied; the wrong choice leads to subtle bugs and performance issues.
  • golang/go β€” Official Go repository; understanding issues, discussions, and design docs provides context for why certain mistakes are common and how Go evolves.
  • uber-go/guide β€” Uber's Go style guide covers many similar anti-patterns and best practices, offering complementary production-focused guidance alongside this educational reference.
  • golang/effective-go β€” Official Effective Go documentation covers foundational Go idioms; this repo expands by showing what NOT to do, making it a natural dual resource.
  • dominikh/go-tools β€” Staticcheck and related linters catch many of the mistakes in this book programmaticallyβ€”understanding them shows how automation prevents these errors.
  • avelino/awesome-go β€” Comprehensive curated list of Go libraries and resources; provides ecosystem context for understanding why certain patterns (or mistakes) are prevalent in the broader Go community.

πŸͺ„PR ideas

To work on one of these in Claude Code or Cursor, paste: Implement the "<title>" PR idea from CLAUDE.md, working through the checklist as the task list.

Add .gitignore entry and cleanup cache directory

The .cache/plugin/social directory contains 50+ generated PNG files and font assets (Roboto TTF files) that should not be version controlled. This is build/plugin output that bloats the repository. Adding proper .gitignore entries and removing cached files will reduce repo size and follow best practices for open source projects.

  • [ ] Create or update .gitignore to exclude .cache/ directory and its subdirectories
  • [ ] Add entries for *.png and font cache patterns that are auto-generated by the social plugin
  • [ ] Remove the .cache/plugin/social directory from git history using git rm -r --cached
  • [ ] Verify with git status that no .cache files are staged
  • [ ] Add a note to CONTRIBUTING.md if it exists about regenerating social images locally

Add GitHub Actions CI workflow for Go code validation

The repo has Go code (go.mod with golang.org/x/sync dependency) but no visible CI pipeline. New contributors need assurance that their changes pass linting and testing. This will catch issues early and maintain code quality standards.

  • [ ] Create .github/workflows/ci.yml with Go 1.18+ matrix testing
  • [ ] Include go vet, golint (or golangci-lint), and go test ./... steps
  • [ ] Run on push to main and all pull requests
  • [ ] Add status badge to README.md showing workflow status
  • [ ] Document the CI requirements in CONTRIBUTING.md

Create CONTRIBUTING.md with contributor guidelines and local setup

A community-driven repo documenting 100 Go mistakes needs clear contribution guidelines. Contributors don't know how to build examples, regenerate social images, test content, or validate the site locally. This reduces friction and improves contribution quality.

  • [ ] Document local development environment setup (Go 1.18+, required tools)
  • [ ] Explain how to run existing examples in the repository
  • [ ] Document the social image generation plugin workflow and how to regenerate cache
  • [ ] Include PR checklist: code follows patterns from existing examples, no .cache files committed, examples are tested
  • [ ] Link to the 100go.co site and explain content structure if applicable

🌿Good first issues

  • Add comprehensive godoc comments and runnable examples to existing mistake code files (GoDoc examples using Example* functions) so readers can preview output directly in pkg.go.dev and IDEs.
  • Create a CONTRIBUTING.md guide explaining how to propose new Go mistakes discovered in the wild, with a template structure (Problem, Why, Solution, References) to maintain consistency across the 100 examples.
  • Audit all examples for Go 1.18 compatibility and add missing context.Context usage patterns where applicable (especially in concurrency mistakes), since Go 1.18 introduced generics and the baseline should reflect modern idioms.

⭐Top contributors

Click to expand

πŸ“Recent commits

Click to expand
  • c13d0b4 β€” CTA. (teivah)
  • ab42583 β€” Adding JetBrains logo (teivah)
  • 5814118 β€” Merge pull request #121 from marikann/marikann-container-aware (teivah)
  • 012637f β€” Last material version. (teivah)
  • 1fd9167 β€” Update url (marikann)
  • 5af6373 β€” Mistake #100: outdated since Go 1.25 container-aware GOMAXPROCS (marikann)
  • d21c846 β€” Missing main. (teivah)
  • 4d041dc β€” Adding blog link. (teivah)
  • 419be0b β€” Adding blog link. (teivah)
  • c5b9c53 β€” Minor. (teivah)

πŸ”’Security observations

The codebase has a good security posture overall. The main concern is an outdated third-party Go dependency (golang.org/x/sync from Feb 2021) that should be updated to the latest version to ensure any known vulnerabilities are patched. Additionally, binary cache files should be excluded from version control. No hardcoded secrets, injection vulnerabilities, or obvious misconfigurations were detected in the provided repository structure. The project appears to be a documentation/educational repository with minimal runtime security risks.

  • Medium Β· Outdated Go Dependency β€” go.mod - golang.org/x/sync dependency. The go.mod file specifies golang.org/x/sync v0.0.0-20210220032951-036812b2e83c, which is from February 2021. This is significantly outdated (over 3 years old based on the timestamp) and may contain known security vulnerabilities or bugs that have been patched in newer versions. Fix: Update the dependency to the latest stable version using 'go get -u golang.org/x/sync' and run 'go mod tidy'. Consider using 'go mod graph' to check for transitive dependencies and 'go list -u -m all' to identify all outdated packages.
  • Low Β· Cache Directory in Repository β€” .cache/plugin/social/ directory. The .cache directory containing plugin files (images, fonts) is included in the repository. This increases repository size and may contain unexpected or unvetted binary files. Font files (TTF) and PNG images should ideally be stored in external CDNs or artifact repositories rather than in version control. Fix: Add .cache/ to .gitignore and use a package manager or CDN for distributing binary assets. If caching is necessary during builds, use git-lfs (Large File Storage) or exclude cache directories from version control.

LLM-derived; treat as a starting point, not a security audit.


Generated by RepoPilot. Verdict based on maintenance signals β€” see the live page for receipts. Re-run on a new commit to refresh.

Mixed signals Β· teivah/100-go-mistakes β€” RepoPilot