{
  "id": "go/cannot-find-module-providing-package",
  "signature": "no required module provides package github.com/foo/bar; to add it:\n\tgo get github.com/foo/bar",
  "signature_zh": "没有必需的模块提供包 github.com/foo/bar；要添加它：\n\tgo get github.com/foo/bar",
  "regex": "no\\ required\\ module\\ provides\\ package\\ github\\.com/foo/bar;\\ to\\ add\\ it:\\\n\\\tgo\\ get\\ github\\.com/foo/bar",
  "domain": "go",
  "category": "module_error",
  "subcategory": null,
  "root_cause": "The import is used in source but go.mod has no require entry for the providing module, and -mod=readonly prevents auto-adding.",
  "root_cause_type": "generic",
  "root_cause_zh": "源码中使用了该导入，但 go.mod 中没有提供该模块的 require 条目，且 -mod=readonly 阻止自动添加。",
  "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": "wrong version causes 'unknown revision' or checksum errors",
      "fail_rate": 0.7,
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "why_fails": "build fails with 'vendor directory does not exist'",
      "fail_rate": 0.9,
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "why_fails": "loses all existing dependency pins and may break transitive deps",
      "fail_rate": 0.6,
      "condition": "",
      "sources": []
    }
  ],
  "workarounds": [
    {
      "action": "",
      "success_rate": 0.95,
      "how": "go get github.com/foo/bar@latest\ngo mod tidy",
      "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-01-22",
  "last_confirmed": "2025-01-01",
  "last_updated": "2025-01-01",
  "evidence_count": 0,
  "tags": [],
  "locale": "en",
  "aliases": []
}