# go: /path/to/project 中的 vendoring 不一致：vendor/modules.txt 已过期

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

## 根因

vendor 目录中的 modules.txt 与 go.mod 中的要求不匹配，通常是在添加/删除依赖后未运行 go mod vendor 导致。

## 版本兼容性

| 版本 | 状态 | 引入 | 弃用 |
|------|------|------|------|
| 1.14 | active | — | — |

## 解决方案

1. **** (95% 成功率)
   ```
   Run 'go mod vendor' to regenerate the vendor directory and modules.txt from go.mod.
   ```
2. **** (90% 成功率)
   ```
   Run 'go mod tidy' to clean up go.mod, then 'go mod vendor' to sync.
   ```

## 无效尝试

- **** — The file is auto-generated; manual edits will be overwritten or cause further inconsistencies. (80% 失败率)
- **** — Without re-vendoring, builds will fail if modules are not in cache or network is unavailable. (60% 失败率)
