• Michael T. Jones's avatar
    math/big: add support for general encoding interfaces · eea28f67
    Michael T. Jones authored
    TextMarshaller and TextUnmarshaller to ease transport of
    unlimited precision rational numbers.
    
    Fixes #7287.
    
    Consists of encode and decode functions and two test
    functions, one using JSON and one using XML. Each
    verifies round trips for integers (rationals with
    denominator == 1) and for fractional vaues.
    
    LGTM=gri
    R=gri, cookieo9, bradfitz, mtj
    CC=golang-codereviews
    https://golang.org/cl/61180043
    eea28f67
rat_test.go 24.5 KB