mirror of
https://github.com/crazybber/awesome-patterns.git
synced 2024-11-22 12:46:03 +03:00
20 lines
240 B
Go
20 lines
240 B
Go
package main
|
|
|
|
import "github.com/davecgh/go-spew/spew"
|
|
|
|
func main() {
|
|
t1 := make(DogsList, 0)
|
|
t2 := DogList{}
|
|
spew.Dump(t1, t2)
|
|
}
|
|
|
|
type DogsList []*Dog
|
|
|
|
type Dog struct {
|
|
Name string
|
|
}
|
|
|
|
func (d *Dog) GetName() string {
|
|
return d.Name
|
|
}
|