cespare / cron

A Go implementation of the cron scheduling format
MIT License
4 stars 1 forks source link

Remove unused var #2

Closed stefan-toubia closed 1 year ago

stefan-toubia commented 1 year ago

This removes an unused first var inside parseSinglePart.

cespare commented 1 year ago

I definitely intended to write first := true (meaning it's the first time through the loop), but that would make the code wrong. Eventually I realized that it makes sense if rangeEnd is exclusive, not inclusive. In that case, something like 3-3 would mean *. But rangeEnd is inclusive and 3-3 is disallowed. Maybe I started with the code having rangeEnd be exclusive. Not quite sure what happened.