# What Go Versions Are Covered by go‑modern‑guidelines? A Complete Guide

> Discover which Go versions go-modern-guidelines supports. Learn about Go 1.0 through 1.27 coverage and CLI tool requirements. Get the complete guide now.

- Repository: [JetBrains/go-modern-guidelines](https://github.com/jetbrains/go-modern-guidelines)
- Tags: getting-started
- Published: 2026-08-29

---

**The go‑modern‑guidelines repository documents idioms and standard‑library features spanning Go 1.0 through Go 1.27, while the companion CLI tool requires Go 1.25 or newer to execute.**

The JetBrains **go‑modern‑guidelines** project serves as a comprehensive reference for writing idiomatic Go code across the language’s entire history. According to the source documentation, these guidelines cover the most useful features introduced from the initial release up through the latest Go 1.27 version. While the recommendations themselves apply broadly, the companion command‑line interface enforces a stricter runtime requirement to ensure reliable operation.

## Full Version Support Range

The guidelines themselves cast a wide net. As stated in [`README.md`](https://github.com/JetBrains/go-modern-guidelines/blob/main/README.md) at lines 9‑13, the repository covers features from **Go 1.0** all the way to **Go 1.27**, the most recent version available at the time of writing. This includes fundamental language constructs from the earliest releases as well as cutting‑edge additions from the 1.26 and 1.27 cycles.

However, the tooling that applies these guidelines imposes a different constraint. The CLI explicitly targets **Go 1.25 or newer**, as documented in [`README.md`](https://github.com/JetBrains/go-modern-guidelines/blob/main/README.md) at lines 31‑32. If your local toolchain is older, the installer automatically falls back to `GOTOOLCHAIN=auto` to download a compatible version, ensuring the binary can build and run without manual intervention.

## Modern Features Documented in the Guidelines

The [`plugin/skills/use-modern-go/SKILL.md`](https://github.com/JetBrains/go-modern-guidelines/blob/main/plugin/skills/use-modern-go/SKILL.md) file catalogs specific idioms and the minimum Go versions required to use them. Below are representative examples that showcase the evolution from Go 1.18 generics through Go 1.26 type‑parameterized built‑ins.

### Go 1.18: Generic Constraints

Generics introduced in Go 1.18 enable type‑safe utility functions that work across ordered types.

```go
import "golang.org/x/exp/constraints"

func Max[T constraints.Ordered](a, b T) T {
    if a > b {
        return a
    }
    return b
}

```

### Go 1.21: Standard Library Slices

The `slices` package brought common collection operations into the standard library, reducing the need for manual loop implementations.

```go
import "golang.org/x/exp/slices"

if slices.Contains(nums, 42) {
    fmt.Println("found")
}

```

### Go 1.22: Comparison Utilities

Go 1.22 introduced the `cmp` package, providing a concise way to select the first non‑zero value from a set of arguments.

```go
import "cmp"

val := cmp.Or(a, b, defaultVal)

```

### Go 1.26: Type‑Parameterized Built‑ins and Error Handling

Recent releases added type parameters to built‑in functions and type‑safe error inspection. Go 1.26 allows passing literal values directly to `new`, and provides type‑assertion helpers for errors.

```go
// Type-parameterized new (Go 1.26)
p := new(42) // *int with value 42

// Type-safe error matching (Go 1.26)
if e := errors.AsType[*MyError](err); e != nil {
    // handle specific error type
}

```

## Key Repository Files

Understanding the version coverage requires examining three primary files in the JetBrains/go‑modern‑guidelines repository:

- **[`README.md`](https://github.com/JetBrains/go-modern-guidelines/blob/main/README.md)** — Defines the overall scope, stating that the guidelines cover Go 1.0 through Go 1.27 and that the CLI requires Go 1.25 or newer.
- **[`plugin/skills/use-modern-go/SKILL.md`](https://github.com/JetBrains/go-modern-guidelines/blob/main/plugin/skills/use-modern-go/SKILL.md)** — Contains the detailed skill definition that maps specific idioms (like those shown above) to their minimum required Go versions.
- **[`scripts/dev-install.sh`](https://github.com/JetBrains/go-modern-guidelines/blob/main/scripts/dev-install.sh)** — The development installation script that enforces the Go 1.25 minimum requirement when building the CLI from source.

## Summary

- The **go‑modern‑guidelines** cover language features and idioms from **Go 1.0 through Go 1.27**.
- The CLI tool that automates these guidelines requires **Go 1.25 or newer** to run, with automatic toolchain selection via `GOTOOLCHAIN=auto` for older environments.
- Specific modern features documented include generics (1.18), the `slices` package (1.21), the `cmp` package (1.22), and type‑parameterized built‑ins (1.26).
- Version requirements are defined in [`README.md`](https://github.com/JetBrains/go-modern-guidelines/blob/main/README.md), while the specific idioms are cataloged in [`plugin/skills/use-modern-go/SKILL.md`](https://github.com/JetBrains/go-modern-guidelines/blob/main/plugin/skills/use-modern-go/SKILL.md).

## Frequently Asked Questions

### What is the minimum Go version needed to use the go‑modern‑guidelines CLI?

The CLI tool requires **Go 1.25 or newer** to execute. If your system has an older version, the installation script automatically invokes `GOTOOLCHAIN=auto` to download a compatible toolchain.

### Do the guidelines themselves work with older Go versions?

Yes. According to [`README.md`](https://github.com/JetBrains/go-modern-guidelines/blob/main/README.md), the documented idioms and recommendations span the entire history of the language from **Go 1.0** up through **Go 1.27**. However, you can only use language features that match your project’s `go.mod` version.

### Where are the specific version requirements for each idiom defined?

The [`plugin/skills/use-modern-go/SKILL.md`](https://github.com/JetBrains/go-modern-guidelines/blob/main/plugin/skills/use-modern-go/SKILL.md) file contains the detailed skill definitions that list which modern idioms (such as `slices.Contains` or `cmp.Or`) require specific Go versions, allowing agents to adapt recommendations based on the target project’s toolchain.

### Can I build the CLI from source with Go 1.24?

No. The [`scripts/dev-install.sh`](https://github.com/JetBrains/go-modern-guidelines/blob/main/scripts/dev-install.sh) script and the project’s build configuration require Go 1.25 or newer. Attempting to compile with Go 1.24 will fail because the source relies on language features and standard‑library APIs introduced in Go 1.25.