ITADN

Question: Make assertions on structs having Decimal as field on libraries like gomock?

#396Opendenizgursoy 创建于 2025-02-14
D
denizgursoycommented
Hello, I use gomock and I make some assertions on a struct that has decimal fields. ``` type MyType struct { Field1 string Decimal decimal.Decimal } ``` Assertions on a type like this always fail in gomock probably because of exp or precisson. Is there an already solution? My solution was to marshal to JSON and compare Thanks
0 条评论