예제 #1
0
func (x *RPCType) UnmarshalJSON(data []byte) error {
	value, err := proto.UnmarshalJSONEnum(RPCType_value, data, "RPCType")
	if err != nil {
		return err
	}
	*x = RPCType(value)
	return nil
}
예제 #2
0
func (x *Command_Type) UnmarshalJSON(data []byte) error {
	value, err := proto.UnmarshalJSONEnum(Command_Type_value, data, "Command_Type")
	if err != nil {
		return err
	}
	*x = Command_Type(value)
	return nil
}