{
  "id": "go/os-file-not-exist-create",
  "signature": "error: open /tmp/foo.txt: no such file or directory",
  "signature_zh": "错误：打开 /tmp/foo.txt：没有那个文件或目录",
  "regex": "error:\\ open\\ /tmp/foo\\.txt:\\ no\\ such\\ file\\ or\\ directory",
  "domain": "go",
  "category": "io_error",
  "subcategory": null,
  "root_cause": "尝试打开不存在的文件，但未使用创建标志。",
  "root_cause_type": "generic",
  "root_cause_zh": "尝试打开不存在的文件，但未使用创建标志。",
  "versions": [
    {
      "version": "1.20",
      "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": "文件不存在，后续操作会失败。",
      "fail_rate": 1.0,
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "why_fails": "os.Create会截断现有文件，可能覆盖数据。",
      "fail_rate": 0.6,
      "condition": "",
      "sources": []
    }
  ],
  "workarounds": [
    {
      "action": "",
      "success_rate": 0.95,
      "how": "f, err := os.OpenFile(\"/tmp/foo.txt\", os.O_RDWR|os.O_CREATE, 0644)",
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "success_rate": 0.9,
      "how": "先检查文件是否存在，再决定打开或创建。",
      "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.86,
  "fix_success_rate": 0.8,
  "resolvable": "true",
  "first_seen": "2024-03-22",
  "last_confirmed": "2025-01-01",
  "last_updated": "2025-01-01",
  "evidence_count": 0,
  "tags": [],
  "locale": "en",
  "aliases": []
}