在下面的代码片段中,我做错了什么?
type Element interface{}
func buncode(in *os.File) (e Element) {
<snip>
e = make(map[string]interface{})
for {
var k string = buncode(in).(string)
v := buncode(in)
e[k] = v
}
<snip>
}
编译给了我这个错误:
gopirate.go:38: invalid operation: e[k] (index of type Element)
双母羊 T eff?