cron icon indicating copy to clipboard operation
cron copied to clipboard

A trivial mistake in the code comment

Open dushaoshuai opened this issue 3 years ago • 1 comments

https://github.com/robfig/cron/blob/ccba498c397bb90a9c84945bbb0f7af2d72b6309/cron.go#L193

func (c *Cron) Entry(id EntryID) Entry {
	for _, entry := range c.Entries() {
		if id == entry.ID {
			return entry
		}
	}
	return Entry{}
}

The zero value for a struct is not nil.

dushaoshuai avatar Jun 26 '21 04:06 dushaoshuai

I agree.. I would merge a PR fixing it. Thanks

robfig avatar Oct 01 '21 20:10 robfig