{
  "id": "go/protobuf-missing-required-field",
  "signature": "proto: required field \"name\" not set",
  "signature_zh": "proto: 必填字段 \"name\" 未设置",
  "regex": "proto:\\ required\\ field\\ \"name\"\\ not\\ set",
  "domain": "go",
  "category": "data_error",
  "subcategory": null,
  "root_cause": "A proto2 message with required fields was not fully populated before serialization. In proto3, required fields are not supported, but if using proto2, this error occurs.",
  "root_cause_type": "generic",
  "root_cause_zh": "proto2 消息中的必填字段在序列化前未完全填充。在 proto3 中不支持必填字段，但如果使用 proto2，则会出现此错误。",
  "versions": [
    {
      "version": "1.x",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    }
  ],
  "os_specific": {},
  "dead_ends": [
    {
      "action": "",
      "why_fails": "Serialization will still fail or produce invalid data that cannot be parsed later.",
      "fail_rate": 1.0,
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "why_fails": "An empty string is still a value, but if the field is required, it must be explicitly set; an empty string may be considered unset in some implementations.",
      "fail_rate": 0.7,
      "condition": "",
      "sources": []
    }
  ],
  "workarounds": [
    {
      "action": "",
      "success_rate": 0.95,
      "how": "msg := &YourMessage{\n    Name: proto.String(\"value\"), // Required field\n}\nif err := proto.Marshal(msg); err != nil {\n    log.Fatalf(\"marshal failed: %v\", err)\n}",
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "success_rate": 0.9,
      "how": "// Update .proto file to syntax = \"proto3\";\n// Remove required keyword; regenerate code",
      "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": "2024-07-10",
  "last_confirmed": "2025-01-01",
  "last_updated": "2025-01-01",
  "evidence_count": 0,
  "tags": [],
  "locale": "en",
  "aliases": []
}