add missing path property handling
This commit is contained in:
@@ -51,6 +51,7 @@ type Hamster struct {
|
||||
Child []*Hamster `json:"childs"`
|
||||
CreatedAt time.Time `json:"createdAt"`
|
||||
UpdatedAt *time.Time `json:"updatedAt"`
|
||||
Cage *Cage `json:"cage"`
|
||||
}
|
||||
|
||||
func (h *Hamster) Die() {
|
||||
@@ -90,9 +91,8 @@ func (h *Hamster) Fuck(another *Hamster) (bool, error) {
|
||||
female, male := func() (*Hamster, *Hamster) {
|
||||
if h.Sexe == FEMALE {
|
||||
return h, another
|
||||
} else {
|
||||
return another, h
|
||||
}
|
||||
return another, h
|
||||
}()
|
||||
female.GestationFather = male
|
||||
female.Gestation = true
|
||||
@@ -147,9 +147,8 @@ func randSexe() string {
|
||||
return func() string {
|
||||
if randNumber(1, 2) == 2 {
|
||||
return MALE
|
||||
} else {
|
||||
return FEMALE
|
||||
}
|
||||
return FEMALE
|
||||
}()
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user