Fully Initialize on New
This commit is contained in:
		| @@ -19,7 +19,7 @@ type TimerList struct { | |||||||
| } | } | ||||||
|  |  | ||||||
| // NewTimerList creates a new empty TimerList. | // NewTimerList creates a new empty TimerList. | ||||||
| func NewTimerList() *TimerList                       { return &TimerList{} } | func NewTimerList() *TimerList                       { return &TimerList{Timers: []*Timer{}} } | ||||||
| func (timerlist *TimerList) Size() int               { return len(timerlist.Timers) } | func (timerlist *TimerList) Size() int               { return len(timerlist.Timers) } | ||||||
| func (timerlist *TimerList) GetTimerSlice() []*Timer { return timerlist.Timers } | func (timerlist *TimerList) GetTimerSlice() []*Timer { return timerlist.Timers } | ||||||
|  |  | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user