Hi, currently i got a message like
message Fee {
int32 year = 1;
int32 month = 2;
float price = 3;
}
and a struct like
type Fee struct {
Year int `json:"year"`
Month int `json:"month"`
Price float64 `json:"price"`
}
But i am getting a literalcompilerIncompatibleAssign error when trying to send it as response.
I tried creating a .proto file with
message Fee {
int32 year = 1;
int32 month = 2;
double price = 3;
}
and generating the .pb file so this message is converted like
type Fee struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Year int32 `protobuf:"varint,1,opt,name=year,proto3" json:"year,omitempty"`
Month int32 `protobuf:"varint,2,opt,name=month,proto3" json:"month,omitempty"`
Price float64 `protobuf:"fixed64,3,opt,name=price,proto3" json:"price,omitempty"`
}
But i cannot consume this last struct as i am not using state, sizeCache and unknownFields