[go-nuts] Re: use of the new type aliasing

2017-09-30 Thread Marlon Che
It's an infinite String method recursion. func (x Uint64) String() string{ return fmt.Sprintf("% X",x) } should be changed to: func (x Uint64) String() string{ return fmt.Sprintf("% X",uint64(x)) } On Sunday, October 1, 2017 at 2:17:17 AM UTC+8, simon place wrote: > > i have a type, ju

[go-nuts] A question about evaluation of channel’s send statement

2017-09-04 Thread Marlon Che
Hi everyone! Please help me figure out the two different results of following code: package main import ( "fmt" "time" ) func main() { var num = 10 var p = &num c := make(chan int) go func() { c <- *p // with this line we will get 11 from channel c //c <