# go: 无效的模块版本 "v1.0.0.1": 版本必须为 vX.Y.Z 格式

- **ID:** `go/invalid-semver-version`
- **领域:** go
- **类别:** config_error
- **验证级别:** ai_generated
- **修复率:** 80%

## 根因

go.mod 或依赖中的版本字符串不遵循语义化版本格式。

## 版本兼容性

| 版本 | 状态 | 引入 | 弃用 |
|------|------|------|------|
| 1.21 | active | — | — |
| 1.22 | active | — | — |
| 1.23 | active | — | — |

## 解决方案

1. **Correct the version to a valid semver string.** (95% 成功率)
   ```
   Change 'v1.0.0.1' to 'v1.0.1' or 'v1.0.0' as appropriate.
   ```
2. **Use a pseudo-version if the module doesn't have a tag.** (85% 成功率)
   ```
   Use 'v0.0.0-20250520120000-abc123' format from commit hash.
   ```

## 无效尝试

- **Using a version with extra digits like v1.0.0.1-beta.** — Semver does not allow four parts; Go strictly enforces vX.Y.Z. (100% 失败率)
- **Removing the 'v' prefix.** — Go requires the 'v' prefix for module versions; without it, it's invalid. (90% 失败率)
