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

Function NewStatsFormat

cli/command/container/formatter_stats.go:105–113  ·  view source on GitHub ↗

NewStatsFormat returns a format for rendering an CStatsContext

(source, osType string)

Source from the content-addressed store, hash-verified

103
104// NewStatsFormat returns a format for rendering an CStatsContext
105func NewStatsFormat(source, osType string) formatter.Format {
106 if source == formatter.TableFormatKey {
107 if osType == winOSType {
108 return winDefaultStatsTableFormat
109 }
110 return defaultStatsTableFormat
111 }
112 return formatter.Format(source)
113}
114
115// NewStats returns a new Stats entity using the given ID, ID-prefix, or
116// name to resolve the container.

Callers 1

RunStatsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…