Modify index to start iteration on the same user, for which last queue was returned.
()
| 27 | |
| 28 | // Modify index to start iteration on the same user, for which last queue was returned. |
| 29 | func (ui UserIndex) ReuseLastUser() UserIndex { |
| 30 | if ui.last >= 0 { |
| 31 | return UserIndex{last: ui.last - 1} |
| 32 | } |
| 33 | return ui |
| 34 | } |
| 35 | |
| 36 | // FirstUser returns UserIndex that starts iteration over user queues from the very first user. |
| 37 | func FirstUser() UserIndex { |