[go-nuts] Re: gofmt: one line if statement

2018-01-07 Thread gavingrover
At the moment func declarations leave it for the user, depending on whether the original was written on one line or not. gofmt will change: func hi(){fmt.Println("Hi.")} func bye(){ fmt.Println("Bye.")} into: func hi() { fmt.Println("Hi.") } func bye() { fmt.Pri

Re: [go-nuts] go/math String methods

2017-12-10 Thread gavingrover
> It's definitely expected that people will simply use pointers for these types. Why do you find it useful to do otherwise? I'm using the contents of big.Int, etc directly so that they act like int64, etc and interoperate with them easily in a scripting language which overloads operators. I'v

[go-nuts] go/math String methods

2017-12-09 Thread gavingrover
Hi In the "math/big" package, the Rat, Int, and Float types only have methods that are attached to their pointer types, including the small handful of them that don't modify the type's data, such as String() and Text(). func (x *Rat) String() { ... } Because I'm working with the conte