mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
reflect: unexported fields are tied to a package
An unexported field of a struct is not visible outside of the package that defines it, so the package path is implicitly part of the definition of any struct with an unexported field. Change-Id: I17c6aac822bd0c24188ab8ba1cc406d6b5d82771 Reviewed-on: https://go-review.googlesource.com/32820 Run-TryBot: David Crawshaw <crawshaw@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org>
This commit is contained in:
parent
9e2c3f4c7e
commit
8d0c105407
3 changed files with 26 additions and 0 deletions
|
|
@ -113,3 +113,7 @@ func IsExported(t Type) bool {
|
|||
func ResolveReflectName(s string) {
|
||||
resolveReflectName(newName(s, "", "", false))
|
||||
}
|
||||
|
||||
type Buffer struct {
|
||||
buf []byte
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue