Would it be nice or nasty for this to
work? https://play.golang.org/p/iCTKx3gF_2
Copy-pasted:
type Thing struct {
Embedded struct {
Name string
}
}
func main() {
x := Thing.Embedded{Name: "Barry"}
fmt.Println(x.Thing.Name)
// output:
// Barry
}
Seems it would be useful to me to be able to do this sometimes, especially
when consuming other people's code that uses embedded struct types.
--
You received this message because you are subscribed to the Google Groups
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.