{
  "id": "go/module-directive-missing",
  "signature": "go: go.mod has no module path",
  "signature_zh": "go: go.mod 没有模块路径",
  "regex": "go:\\ go\\.mod\\ has\\ no\\ module\\ path",
  "domain": "go",
  "category": "config_error",
  "subcategory": null,
  "root_cause": "The go.mod file is missing the 'module' directive, which is required to define the module's import path.",
  "root_cause_type": "generic",
  "root_cause_zh": "go.mod 文件缺少 'module' 指令，该指令用于定义模块的导入路径。",
  "versions": [
    {
      "version": "1.18",
      "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"
    },
    {
      "version": "1.22",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    }
  ],
  "os_specific": {},
  "dead_ends": [
    {
      "action": "Adding a random module path like 'module example' without proper naming.",
      "why_fails": "The module path should be a valid import path; random names cause issues later.",
      "fail_rate": 0.6,
      "condition": "",
      "sources": []
    },
    {
      "action": "Deleting go.mod and running 'go mod init' without arguments.",
      "why_fails": "go mod init requires a module path; without it, it prompts for input.",
      "fail_rate": 0.7,
      "condition": "",
      "sources": []
    }
  ],
  "workarounds": [
    {
      "action": "Add the module directive with the correct import path.",
      "success_rate": 0.95,
      "how": "Edit go.mod to include: 'module github.com/yourusername/yourproject' at the top.",
      "condition": "",
      "sources": []
    },
    {
      "action": "Reinitialize the module with 'go mod init'.",
      "success_rate": 0.9,
      "how": "Run 'go mod init github.com/yourusername/yourproject' to generate a proper go.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.88,
  "fix_success_rate": 0.8,
  "resolvable": "true",
  "first_seen": "2025-08-10",
  "last_confirmed": "2025-01-01",
  "last_updated": "2025-01-01",
  "evidence_count": 0,
  "tags": [],
  "locale": "en",
  "aliases": []
}