I am trying to understand why this code works:
ioReaderType := reflect.ValueOf(struct{ ioReader io.Reader }{}).FieldByName("ioReader").Type()
fmt.Println(ioReaderType.String()) // prints "io.Reader"
But this one panic
ioReaderType := reflect.TypeOf(io.Reader(nil))
fmt.Println(ioReaderType.String()) // panic
https://play.golang.org/p/F2ndRax1f4E