()
| 55 | } |
| 56 | |
| 57 | func init() { |
| 58 | for state := range numberedStates { |
| 59 | // for jobs, we use the "complete" state, and so it should be factored |
| 60 | // in to the computation of the longest state. |
| 61 | if (!terminalState(state) || state == swarm.TaskStateComplete) && len(state) > longestState { |
| 62 | longestState = len(state) |
| 63 | } |
| 64 | } |
| 65 | } |
| 66 | |
| 67 | func terminalState(state swarm.TaskState) bool { |
| 68 | return numberedStates[state] > numberedStates[swarm.TaskStateRunning] |
nothing calls this directly
no test coverage detected
searching dependent graphs…