1
0
mirror of https://github.com/golang/go synced 2024-11-18 16:14:46 -07:00

math/big: fix doc comments

Fixes #8904.

TBR=iant
R=iant
CC=golang-codereviews
https://golang.org/cl/148650043
This commit is contained in:
Robert Griesemer 2014-10-07 10:56:58 -07:00
parent 6ee36a9151
commit 87f51f1031
2 changed files with 4 additions and 4 deletions

View File

@ -1016,12 +1016,12 @@ func (z *Int) UnmarshalJSON(text []byte) error {
return nil
}
// MarshalText implements the encoding.TextMarshaler interface
// MarshalText implements the encoding.TextMarshaler interface.
func (z *Int) MarshalText() (text []byte, err error) {
return []byte(z.String()), nil
}
// UnmarshalText implements the encoding.TextUnmarshaler interface
// UnmarshalText implements the encoding.TextUnmarshaler interface.
func (z *Int) UnmarshalText(text []byte) error {
if _, ok := z.SetString(string(text), 0); !ok {
return fmt.Errorf("math/big: cannot unmarshal %q into a *big.Int", text)

View File

@ -699,12 +699,12 @@ func (z *Rat) GobDecode(buf []byte) error {
return nil
}
// MarshalText implements the encoding.TextMarshaler interface
// MarshalText implements the encoding.TextMarshaler interface.
func (r *Rat) MarshalText() (text []byte, err error) {
return []byte(r.RatString()), nil
}
// UnmarshalText implements the encoding.TextUnmarshaler interface
// UnmarshalText implements the encoding.TextUnmarshaler interface.
func (r *Rat) UnmarshalText(text []byte) error {
if _, ok := r.SetString(string(text)); !ok {
return fmt.Errorf("math/big: cannot unmarshal %q into a *big.Rat", text)