MCPcopy
hub / github.com/docker/docker-agent / String

Method String

pkg/tools/lifecycle/state.go:52–57  ·  view source on GitHub ↗

String returns a short, lowercase human-readable name. Out-of-range or negative State values fall back to "state(N)" instead of panicking on the lookup array.

()

Source from the content-addressed store, hash-verified

50// negative State values fall back to "state(N)" instead of panicking on
51// the lookup array.
52func (s State) String() string {
53 if s >= 0 && int(s) < len(stateNames) && stateNames[s] != "" {
54 return stateNames[s]
55 }
56 return fmt.Sprintf("state(%d)", s)
57}
58
59// IsTerminal reports whether s requires external action (Start/Restart/Stop)
60// to leave.

Callers 15

StartMethod · 0.45
TestState_StringFunction · 0.45
runJavascriptMethod · 0.45
toolToJsDocFunction · 0.45
toCommentFunction · 0.45
InstructionsMethod · 0.45
createHandlerMethod · 0.45
extractTextFunction · 0.45
logErrorResponseMethod · 0.45
refreshStoredTokenMethod · 0.45
handleOAuthFlowMethod · 0.45

Calls

no outgoing calls

Tested by 6

TestState_StringFunction · 0.36
TestAllEventTypesFunction · 0.36
TestOverrideModelFunction · 0.36
TestTitleModelResolutionFunction · 0.36