interface
vs struct
A pointer to a struct and a pointer to an interface are not the same.
An interface can store either a struct directly or a pointer to a struct.
type Fooer interface { Dummy() } type Foo struct{} func (f Foo) Dummy() {} func main() { var f1 Foo var f2 *Foo = &Foo{} DoFoo(f1) DoFoo(f2) } func DoFoo(f Fooer) { fmt.Printf("[%T] %+v\n", f, f) } /* output */ // [main.Foo] {} // [*main.Foo] &{}