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
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 <