Commit 2d2ae531 authored by Andrew Gerrand's avatar Andrew Gerrand

reflect: update docs; Interface can return a method value

Fixes #6460.

R=golang-dev, r
CC=golang-dev
https://golang.org/cl/13761046
parent d9f034dc
......@@ -971,10 +971,7 @@ func (v Value) CanInterface() bool {
// Interface returns v's current value as an interface{}.
// It is equivalent to:
// var i interface{} = (v's underlying value)
// If v is a method obtained by invoking Value.Method
// (as opposed to Type.Method), Interface cannot return an
// interface value, so it panics.
// It also panics if the Value was obtained by accessing
// It panics if the Value was obtained by accessing
// unexported struct fields.
func (v Value) Interface() (i interface{}) {
return valueInterface(v, true)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment