# go: invalid go version 'go1.2x': must be of the form go1.xx

- **ID:** `go/invalid-go-version-directive`
- **Domain:** go
- **Category:** config_error
- **Verification:** ai_generated
- **Fix Rate:** 80%

## Root Cause

The go directive in go.mod specifies an invalid version string, such as a typo or unsupported version.

## Version Compatibility

| Version | Status | Introduced | Deprecated |
|---------|--------|------------|------------|
| 1.21 | active | — | — |
| 1.22 | active | — | — |
| 1.23 | active | — | — |

## Workarounds

1. **Correct the go version to a valid one matching your Go installation.** (95% success)
   ```
   Edit go.mod: change 'go 1.2x' to 'go 1.21' (or your installed version). Run 'go version' to check.
   ```
2. **Use 'go mod edit -go=1.21' to set the correct version.** (90% success)
   ```
   Run: 'go mod edit -go=1.21' to update the directive automatically.
   ```

## Dead Ends

- **Removing the go directive entirely from go.mod.** — Go will default to the current toolchain version, which may cause other compatibility issues. (70% fail)
- **Setting a very high go version like 'go1.99' to avoid errors.** — Go only recognizes valid releases; invalid versions cause errors. (100% fail)
