{
  "id": "go/proto-required-field-not-set",
  "signature": "proto: required field \"User.email\" not set",
  "signature_zh": "proto: 必填字段 \"User.email\" 未设置",
  "regex": "proto:\\ required\\ field\\ \"User\\.email\"\\ not\\ set",
  "domain": "go",
  "category": "data_error",
  "subcategory": null,
  "root_cause": "proto2 required fields must be explicitly set before marshaling. In proto3 there are no required fields, so this only appears with proto2 or legacy generated code.",
  "root_cause_type": "generic",
  "root_cause_zh": "proto2 的 required 字段在序列化前必须显式设置。proto3 没有 required 字段，因此该错误只出现在 proto2 或旧版生成代码中。",
  "versions": [
    {
      "version": "github.com/golang/protobuf v1.5 / proto2",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    }
  ],
  "os_specific": {},
  "dead_ends": [
    {
      "action": "",
      "why_fails": "Marshaling is deterministic; an unset required field stays unset. Retrying never fills the field.",
      "fail_rate": 0.95,
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "why_fails": "Regenerating changes the API; callers relying on presence semantics may now send empty values silently.",
      "fail_rate": 0.5,
      "condition": "",
      "sources": []
    }
  ],
  "workarounds": [
    {
      "action": "",
      "success_rate": 0.9,
      "how": "u.Email = proto.String(\"user@example.com\")\nif err := proto.Marshal(u); err != nil {\n    log.Fatalf(\"marshal: %v\", err)\n}",
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "success_rate": 0.8,
      "how": "// user.proto: syntax = \"proto3\";\n// string email = 1 [ (validate.rules).string.email = true ];",
      "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-02-28",
  "last_confirmed": "2025-01-01",
  "last_updated": "2025-01-01",
  "evidence_count": 0,
  "tags": [],
  "locale": "en",
  "aliases": []
}