pascaldekloe / goe

enterprise tooling
Creative Commons Zero v1.0 Universal
13 stars 4 forks source link

Problem using Big.Rational as want in the verify #1

Closed mikelangelon closed 8 years ago

mikelangelon commented 8 years ago

Using the verify function, works perfect except if a Big.Rat variable is found in the "want" parameter. For example, this struct give problems due to that value:

&Effect{
InvoiceLineID: 400057, Value: big.NewRat(200, 1), Spend: big.NewRat(30, 1),
},

Also I'm attaching the log.

Thanks :D

bugBigRat.txt

pascaldekloe commented 8 years ago

Go's reflection does not provide access to unexported fields. However, these arbitrary-precision numbers do implement encoding.TextMarshaller. I'll try a comparison fallback on the serial.

pascaldekloe commented 8 years ago

Can you give that one a try? :-)

mikelangelon commented 8 years ago

It works! Thanks :D