{
  "id": "go/go-mod-init-invalid-go-version",
  "signature": "go: go.mod file not found in current directory or any parent directory; see 'go help modules'",
  "signature_zh": "go: 在当前目录或任何父目录中未找到 go.mod 文件；参见 'go help modules'",
  "regex": "go:\\ go\\.mod\\ file\\ not\\ found\\ in\\ current\\ directory\\ or\\ any\\ parent\\ directory;\\ see\\ 'go\\ help\\ modules'",
  "domain": "go",
  "category": "config_error",
  "subcategory": null,
  "root_cause": "The go command is invoked outside of a module context, or the module has not been initialized with go mod init.",
  "root_cause_type": "generic",
  "root_cause_zh": "go 命令在模块上下文之外被调用，或者模块尚未通过 go mod init 初始化。",
  "versions": [
    {
      "version": "1.11",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    }
  ],
  "os_specific": {},
  "dead_ends": [
    {
      "action": "",
      "why_fails": "Modules are the default in modern Go; disabling them may lead to other dependency issues.",
      "fail_rate": 0.5,
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "why_fails": "An incorrectly formatted go.mod can cause other errors.",
      "fail_rate": 0.3,
      "condition": "",
      "sources": []
    }
  ],
  "workarounds": [
    {
      "action": "",
      "success_rate": 0.95,
      "how": "Run 'go mod init <module-name>' in the project root to create a go.mod file.",
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "success_rate": 0.8,
      "how": "If in GOPATH mode, set GO111MODULE=on and run go mod init, or move the project to a proper module path.",
      "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-06-20",
  "last_confirmed": "2025-01-01",
  "last_updated": "2025-01-01",
  "evidence_count": 0,
  "tags": [],
  "locale": "en",
  "aliases": []
}