Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Gopher ¶
type Gopher struct { Name string `json:"name"` Sleep time.Duration `json:"sleep"` Eat int `json:"eat"` }
func (*Gopher) Live ¶
func (g *Gopher) Live(farm *GopherFarm, radio chan string)
type GopherFarm ¶
type GopherFarm struct { Gophers []*Gopher `json:"gophers"` TotalFood int `json:"totalFood"` sync.Mutex // contains filtered or unexported fields }
func Build ¶
func Build() *GopherFarm
func (*GopherFarm) LiveFreeOrDieHard ¶
func (f *GopherFarm) LiveFreeOrDieHard()
func (*GopherFarm) LunchTime ¶
func (f *GopherFarm) LunchTime(gopher *Gopher) error
func (*GopherFarm) Open ¶
func (f *GopherFarm) Open()
Click to show internal directories.
Click to hide internal directories.