79579423

Date: 2025-04-17 14:00:52
Score: 0.5
Natty:
Report link

You can introduce "first" and "last" values like this

const(
    Monday DayOfWeek = iota
    Sunday
    // extras
    firstDay = Monday
    lastDay = Sunday
)

And iterate

for d := firstDay; d <= lastDay; d++ {
 ...
Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Low reputation (0.5):
Posted by: aknopov