# go: example.com/module@v1.0.0: invalid go version '1.21': must be X.Y.Z

- **ID:** `go/invalid-go-version-in-module`
- **Domain:** go
- **Category:** build_error
- **Verification:** ai_generated
- **Fix Rate:** 80%

## Root Cause

The 'go' directive in go.mod specifies a version string that does not follow the required semantic versioning format (e.g., '1.21' instead of '1.21.0').

## Version Compatibility

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

## Workarounds

1. **Correct the go directive to use proper semantic versioning (e.g., 1.21.0)** (95% success)
   ```
   Edit go.mod: replace 'go 1.21' with 'go 1.21.0'
   ```
2. **Use 'go mod edit -go=1.21.0' to fix it automatically** (90% success)
   ```
   go mod edit -go=1.21.0
   ```

## Dead Ends

- **Changing the go directive to a non-existent version like '1.99'** — Go only supports releases; non-existent versions cause the toolchain to fail to locate the proper standard library. (80% fail)
- **Removing the go directive entirely** — Without a go directive, the module defaults to an older version, potentially causing incompatibilities with newer language features. (50% fail)
