{
  "id": "go/http-unsupported-protocol-scheme",
  "signature": "error: unsupported protocol scheme \"ftp\"",
  "signature_zh": "错误：不支持的协议方案\"ftp\"",
  "regex": "error:\\ unsupported\\ protocol\\ scheme\\ \"ftp\"",
  "domain": "go",
  "category": "config_error",
  "subcategory": null,
  "root_cause": "http.Get或http.NewRequest使用了非HTTP/HTTPS的URL方案，如ftp或file。",
  "root_cause_type": "generic",
  "root_cause_zh": "http.Get或http.NewRequest使用了非HTTP/HTTPS的URL方案，如ftp或file。",
  "versions": [
    {
      "version": "1.21",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    }
  ],
  "os_specific": {},
  "dead_ends": [
    {
      "action": "",
      "why_fails": "http包不处理ftp，需要更换库。",
      "fail_rate": 0.9,
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "why_fails": "请求永远不会成功。",
      "fail_rate": 1.0,
      "condition": "",
      "sources": []
    }
  ],
  "workarounds": [
    {
      "action": "",
      "success_rate": 0.9,
      "how": "检查并修正URL：\nif !strings.HasPrefix(url, \"http://\") && !strings.HasPrefix(url, \"https://\") {\n    url = \"http://\" + url\n}",
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "success_rate": 0.85,
      "how": "使用url.Parse验证方案：\nparsed, err := url.Parse(rawURL)\nif err != nil || (parsed.Scheme != \"http\" && parsed.Scheme != \"https\") {\n    // 处理错误\n}",
      "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": "2024-04-05",
  "last_confirmed": "2025-01-01",
  "last_updated": "2025-01-01",
  "evidence_count": 0,
  "tags": [],
  "locale": "en",
  "aliases": []
}