JetBrains has released a plugin called go-modern-guidelines that helps AI coding agents like Junie and Claude Code generate modern, idiomatic Go code. The problem it solves: AI models tend to produce outdated Go patterns due to training data cutoffs and frequency bias toward older code. The plugin reads the Go version from go.mod and instructs agents to use features available up to that version—for example, using slices.Contains() instead of manual loops, or errors.AsType[T]() instead of the older errors.As() pattern. In Junie 2xx.620.xx+, it works out of the box. For Claude Code, it requires installing via a few slash commands in a session.

4m read timeFrom blog.jetbrains.com
Post cover image
Table of contents
Why do you need it?How to enable

Sort: