MCPcopy Index your code
hub / github.com/docker/cli / init

Function init

cli/command/service/progress/progress.go:57–65  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

55}
56
57func 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
67func terminalState(state swarm.TaskState) bool {
68 return numberedStates[state] > numberedStates[swarm.TaskStateRunning]

Callers

nothing calls this directly

Calls 1

terminalStateFunction · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…