Re: [go-nuts] Can't understand the nil argument passing to function difference

2016-12-01 Thread Ian Lance Taylor
On Thu, Dec 1, 2016 at 1:46 PM, Sergey Parilin wrote: > > Could anyone explain why it happens? Why nil checking is working for the > first case and doesn't work for rest of cases? https://golang.org/doc/faq#nil_error Ian -- You received this message because you are subscribed to the Google Gr

[go-nuts] Can't understand the nil argument passing to function difference

2016-12-01 Thread Sergey Parilin
Hi, I have this example: package main import ( "fmt" "time" ) func main() { fmt.Println("Simple test") test(nil) fmt.Println() fmt.Println("Base test") var b *base b = nil test(b) fmt.Println() time.Sleep(1 * time.S