Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
go
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
go
Commits
af954996
Commit
af954996
authored
Mar 01, 2012
by
Russ Cox
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
reflect: expand doc for Value.Interface
R=golang-dev, r CC=golang-dev
https://golang.org/cl/5716057
parent
103c9db7
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
2 deletions
+4
-2
src/pkg/reflect/value.go
src/pkg/reflect/value.go
+4
-2
No files found.
src/pkg/reflect/value.go
View file @
af954996
...
...
@@ -800,13 +800,15 @@ func (v Value) CanInterface() bool {
return
v
.
flag
&
(
flagMethod
|
flagRO
)
==
0
}
// Interface returns v's value as an interface{}.
// 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
// unexported struct fields.
func
(
v
Value
)
Interface
()
interface
{}
{
func
(
v
Value
)
Interface
()
(
i
interface
{})
{
return
valueInterface
(
v
,
true
)
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment