1package model 2 3type Clock struct { 4 Day int `json:"day"` 5 Time int `json:"time"` 6 DayLength int `json:"dayLength"` 7 NightLength int `json:"nightLength"` 8} 9 10func (c Clock) Night() bool { return c.Time >= c.DayLength }