Modify index to start iteration on the same user, for which last queue was returned.
()
| 33 | |
| 34 | // Modify index to start iteration on the same user, for which last queue was returned. |
| 35 | func (ui UserIndex) ReuseLastUser() UserIndex { |
| 36 | if ui.last >= 0 { |
| 37 | return UserIndex{last: ui.last - 1} |
| 38 | } |
| 39 | return ui |
| 40 | } |
| 41 | |
| 42 | // FirstUser returns UserIndex that starts iteration over user queues from the very first user. |
| 43 | func FirstUser() UserIndex { |
no outgoing calls
no test coverage detected