-
Rob Pike authored
IsNil isn't quite the same as == nil, as this snippet shows: // http://play.golang.org/p/huomslDZgw package main import "fmt" import "reflect" func main() { var i interface{} v := reflect.ValueOf(i) fmt.Println(v.IsValid(), i == nil) fmt.Println(v.IsNil()) } The fact that IsNil panics if you call it with an untyped nil was not apparent. Verbiage added for clarity. LGTM=rsc R=rsc CC=golang-codereviews https://golang.org/cl/65480043
8b0b994c