Fully Initialize on New

This commit is contained in:
Brian Buller 2023-08-23 11:29:30 -05:00
parent cf2312525d
commit 8a9e6c2bec

View File

@ -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 }