awesome-patterns/playground/main.go

20 lines
240 B
Go
Raw Normal View History

2018-01-25 03:51:40 +03:00
package main
import "github.com/davecgh/go-spew/spew"
2018-01-25 03:51:40 +03:00
func main() {
t1 := make(DogsList, 0)
t2 := DogList{}
spew.Dump(t1, t2)
2018-01-25 03:51:40 +03:00
}
type DogsList []*Dog
2018-01-25 03:51:40 +03:00
type Dog struct {
Name string
}
func (d *Dog) GetName() string {
return d.Name
}