mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
reflect: add FuncOf function
This also involves adding functions to typelinks along with a minor change to ensure they are sorted correctly. Change-Id: I054a79b6498a634cbccce17579f52c299733c2cf Reviewed-on: https://go-review.googlesource.com/1996 Reviewed-by: Ian Lance Taylor <iant@golang.org>
This commit is contained in:
parent
f5b5e41814
commit
e1c1fa2919
4 changed files with 199 additions and 5 deletions
|
|
@ -44,3 +44,13 @@ func FuncLayout(t Type, rcvr Type) (frametype Type, argSize, retOffset uintptr,
|
|||
ptrs = ft.kind&kindNoPointers == 0
|
||||
return
|
||||
}
|
||||
|
||||
func TypeLinks() []string {
|
||||
var r []string
|
||||
for _, m := range typelinks() {
|
||||
for _, t := range m {
|
||||
r = append(r, *t.string)
|
||||
}
|
||||
}
|
||||
return r
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue