mirror of
https://github.com/tinygo-org/tinygo.git
synced 2026-08-17 11:13:27 +00:00
reflect: implement Method.IsExported
This commit is contained in:
committed by
Ron Evans
parent
8b4624a420
commit
e368551919
@@ -127,6 +127,11 @@ type Method struct {
|
|||||||
Index int // index for Type.Method
|
Index int // index for Type.Method
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// IsExported reports whether the method is exported.
|
||||||
|
func (m Method) IsExported() bool {
|
||||||
|
return m.PkgPath == ""
|
||||||
|
}
|
||||||
|
|
||||||
// The following Type type has been copied almost entirely from
|
// The following Type type has been copied almost entirely from
|
||||||
// https://github.com/golang/go/blob/go1.15/src/reflect/type.go#L27-L212.
|
// https://github.com/golang/go/blob/go1.15/src/reflect/type.go#L27-L212.
|
||||||
// Some methods have been commented out as they haven't yet been implemented.
|
// Some methods have been commented out as they haven't yet been implemented.
|
||||||
|
|||||||
Reference in New Issue
Block a user