MCPcopy
hub / github.com/golang/protobuf / UnmarshalJSON

Method UnmarshalJSON

internal/testprotos/jsonpb_proto/test2.pb.go:58–65  ·  view source on GitHub ↗
(data []byte)

Source from the content-addressed store, hash-verified

56}
57
58func (x *Widget_Color) UnmarshalJSON(data []byte) error {
59 value, err := proto.UnmarshalJSONEnum(Widget_Color_value, data, "Widget_Color")
60 if err != nil {
61 return err
62 }
63 *x = Widget_Color(value)
64 return nil
65}
66
67func (Widget_Color) EnumDescriptor() ([]byte, []int) {
68 return fileDescriptor_50cab1d8463dea41, []int{3, 0}

Callers

nothing calls this directly

Calls 2

UnmarshalJSONEnumFunction · 0.92
Widget_ColorTypeAlias · 0.85

Tested by

no test coverage detected