Created
May 17, 2016 10:04
-
-
Save krishnasrinivas/a8ad8504175b15aaf9bbd1b1942fe309 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"fmt" | |
) | |
type ex struct {} | |
func (e ex) Error() string {return "wow"} | |
func main() { | |
var a *ex | |
var err error | |
a = nil | |
fmt.Println(a == nil) | |
err = nil | |
fmt.Println(err == nil) | |
err = a | |
fmt.Println(err == nil) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment