{
  "id": "go/updates-to-go-mod-needed",
  "signature": "go: updates to go.mod needed; to update it:\n\tgo mod tidy",
  "signature_zh": "go: 需要更新 go.mod；要更新它：\n\tgo mod tidy",
  "regex": "go:\\ updates\\ to\\ go\\.mod\\ needed;\\ to\\ update\\ it:\\\n\\\tgo\\ mod\\ tidy",
  "domain": "go",
  "category": "config_error",
  "subcategory": null,
  "root_cause": "The build is running with -mod=readonly (default in modules) and go.mod is out of sync with imports or the toolchain directive.",
  "root_cause_type": "generic",
  "root_cause_zh": "构建以 -mod=readonly 运行（模块默认），而 go.mod 与导入或 toolchain 指令不同步。",
  "versions": [
    {
      "version": "1.16+",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "1.21+",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    }
  ],
  "os_specific": {},
  "dead_ends": [
    {
      "action": "",
      "why_fails": "invalid go.mod syntax and still out of sync",
      "fail_rate": 0.9,
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "why_fails": "it is already the default; does not resolve the mismatch",
      "fail_rate": 1.0,
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "why_fails": "loses dependency pins and can change versions unexpectedly",
      "fail_rate": 0.7,
      "condition": "",
      "sources": []
    }
  ],
  "workarounds": [
    {
      "action": "",
      "success_rate": 0.97,
      "how": "go mod tidy\ngo build ./...",
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "success_rate": 0.9,
      "how": "go build -mod=mod ./...",
      "condition": "",
      "sources": []
    }
  ],
  "workarounds_zh": [],
  "transition_graph": {
    "leads_to": [],
    "preceded_by": [],
    "frequently_confused_with": []
  },
  "official_doc_url": null,
  "official_doc_section": null,
  "error_code": null,
  "verification_tier": "ai_generated",
  "confidence": 0.9,
  "fix_success_rate": 0.8,
  "resolvable": "true",
  "first_seen": "2024-04-18",
  "last_confirmed": "2025-01-01",
  "last_updated": "2025-01-01",
  "evidence_count": 0,
  "tags": [],
  "locale": "en",
  "aliases": []
}