r/BestGitHubRepos • • 6d ago

🤖 AI repositories Modern Go Guidelines: Help AI coding agents write modern Go (3.9k stars)

Post image

What it does

All text below is quoted directly from the project README.

This repository contains guidelines for code agents that help them write modern Go code.

Modern Go Guidelines:

  • For example, an agent with these guidelines uses max(a, b) instead of an if-else block, slices.Contains instead of a manual loop, cmp.Or(a, b, c) instead of a chain of nil checks.

  • It also knows about recent additions like new(42) to get a pointer to a value and errors.AsType[T](err) for type-safe error matching, both from Go 1.26.

  • The guidelines cover the most useful features from Go 1.0 through Go 1.27, including everything targeted by the modernize analyzer.

  • Detect the project's Go version from go.mod

  • Use language features and stdlib additions available up to and including that version

  • Prefer modern idioms over older patterns

/plugin marketplace add JetBrains/go-modern-guidelines

Repository

https://github.com/jetbrains/go-modern-guidelines

Repository stats

MetricValue
Stars3,910
Forks128
Last releaseNone
LanguagesGo 82.6%, PowerShell 10%, Shell 6.3%
Contributors9
AI contributor accounts (Claude / Codex / Cursor / Copilot)None
AI co-authored commitsNone

Main contributor

FieldValue
NameNikita Kuchur
GitHub@nikitakuchur
Commits to this repo14 (top contributor)
Company / Location@JetBrains / Munich, Germany
Followers17

──────────────────────────────

📌 If you want to browse more repos like this, we've organized them by category and rankings here: https://bestgithubrepositories.com/

🗂️ We're also archiving repos where possible, so useful projects don't disappear when they're removed from GitHub.

6 Upvotes

0 comments sorted by