{
  "id": "go/package-not-found-in-goroot",
  "signature": "package example.com/foo is not in GOROOT (/usr/local/go/src/example.com/foo)",
  "signature_zh": "包 example.com/foo 不在 GOROOT 中 (/usr/local/go/src/example.com/foo)",
  "regex": "package\\ example\\.com/foo\\ is\\ not\\ in\\ GOROOT\\ \\(/usr/local/go/src/example\\.com/foo\\)",
  "domain": "go",
  "category": "module_error",
  "subcategory": null,
  "root_cause": "Import path is incorrectly resolved to GOROOT's standard library instead of a module dependency.",
  "root_cause_type": "generic",
  "root_cause_zh": "导入路径被错误解析为GOROOT下的标准库，而不是模块依赖。",
  "versions": [
    {
      "version": "1.16",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "1.17",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    }
  ],
  "os_specific": {},
  "dead_ends": [
    {
      "action": "复制包到GOROOT目录",
      "why_fails": "GOROOT不应被修改，且这不是正确做法。",
      "fail_rate": 0.9,
      "condition": "",
      "sources": []
    },
    {
      "action": "设置GO111MODULE=off",
      "why_fails": "禁用模块模式会导致其他依赖问题。",
      "fail_rate": 0.7,
      "condition": "",
      "sources": []
    }
  ],
  "workarounds": [
    {
      "action": "确保在模块目录内运行",
      "success_rate": 0.8,
      "how": "cd /path/to/module && go build",
      "condition": "",
      "sources": []
    },
    {
      "action": "设置GO111MODULE=on",
      "success_rate": 0.9,
      "how": "export GO111MODULE=on\ngo build",
      "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.87,
  "fix_success_rate": 0.8,
  "resolvable": "true",
  "first_seen": "2025-04-02",
  "last_confirmed": "2025-01-01",
  "last_updated": "2025-01-01",
  "evidence_count": 0,
  "tags": [],
  "locale": "en",
  "aliases": []
}