Original post

I hope this is the correct way of saying it. In the following example `NewDog` returns a pointer to a Dog struct but I cant access the fields, only the methods can be called.

Example: https://play.golang.org/p/m3-q04Y4LkU

When I run this example, I get:

d.name undefined (type Animal has no field or method name)

Is it possible to access the fields of the dog struct, or am I restricted to methods only?

Thanks!