R=r
CC=golang-dev
https://golang.org/cl/982043
return nil
}
if intf, ok := data.(*reflect.InterfaceValue); ok {
- data = intf.Elem()
+ data = reflect.Indirect(intf.Elem())
}
switch typ := data.Type().(type) {
stringmap map[string]string
bytes []byte
iface interface{}
+ ifaceptr interface{}
}
func (s *S) pointerMethod() string { return "ptrmethod!" }
out: "[1 2 3]",
},
+ &Test{
+ in: "{.section ifaceptr}{item} {value}{.end}",
+
+ out: "Item Value",
+ },
}
func TestAll(t *testing.T) {
s.stringmap["stringkey2"] = "stringresult"
s.bytes = []byte("hello")
s.iface = []int{1, 2, 3}
+ s.ifaceptr = &T{"Item", "Value"}
var buf bytes.Buffer
for _, test := range tests {