# go: 模块作者已撤回 example.com/module@v1.0.0；运行 'go mod tidy' 更新

- **ID:** `go/go-mod-tidy-fails-on-retracted`
- **领域:** go
- **类别:** build_error
- **验证级别:** ai_generated
- **修复率:** 80%

## 根因

模块作者已撤回某个版本，将其标记为已弃用或不安全，但 go.mod 仍引用它。

## 版本兼容性

| 版本 | 状态 | 引入 | 弃用 |
|------|------|------|------|
| 1.16 | active | — | — |
| 1.17 | active | — | — |
| 1.18 | active | — | — |
| 1.19 | active | — | — |
| 1.20 | active | — | — |
| 1.21 | active | — | — |
| 1.22 | active | — | — |
| 1.23 | active | — | — |

## 解决方案

1. **Run 'go mod tidy' to automatically upgrade to a non-retracted version** (90% 成功率)
   ```
   go mod tidy
   ```
2. **Manually upgrade to a specific newer version** (85% 成功率)
   ```
   go get example.com/module@v1.1.0
   ```

## 无效尝试

- **Ignoring the warning and continuing to build** — Builds may succeed, but the retracted version may have security vulnerabilities or be removed in the future. (40% 失败率)
- **Manually editing go.mod to re-add the retracted version** — Go will still detect it as retracted and issue the same warning. (90% 失败率)
