向切片添加结构的指针

I'm trying to add a pointer to a struct to a slice, but I can't get rid of this error:

cannot use NewDog() (type *Dog) as type *Animal in append:
    *Animal is pointer to interface, not interface

How can I avoid this error? (while still using pointers)

package main

import "fmt"

type Animal interface {
  Speak()
}

type Dog struct {
}

func (d *Dog) Speak() {
  fmt.Println("Ruff!")
}

func NewDog() *Dog {
  return &Dog{}
}

func main() {
  pets := make([]*Animal, 2)
  pets[0] = NewDog()
  (*pets[0]).Speak()
}
package main

import "fmt"

type Animal interface {
  Speak()
}

type Dog struct {
}

func (d *Dog) Speak() {
  fmt.Println("Ruff!")
}

func NewDog() *Dog {
  return &Dog{}
}

func main() {
  pets := make([]Animal, 2)
  pets[0] = NewDog()
  pets[0].Speak()
}

You don't need a Slice of pointers to Animal interfaces.

http://golang.org/doc/effective_go.html#pointers_vs_values

just change your code to:

func main() {
  pets := make([]Animal, 2)
  pets[0] = NewDog()
  pets[0].Speak()
}

a interface value is already an implicit pointer.