MCPcopy Create free account
hub / github.com/docker/cli / prettyPrintClientInfo

Function prettyPrintClientInfo

cli/command/system/info.go:217–238  ·  view source on GitHub ↗
(streams command.Streams, info clientInfo)

Source from the content-addressed store, hash-verified

215}
216
217func prettyPrintClientInfo(streams command.Streams, info clientInfo) {
218 fprintlnNonEmpty(streams.Out(), " Version: ", info.Version)
219 fprintln(streams.Out(), " Context: ", info.Context)
220 fprintln(streams.Out(), " Debug Mode:", info.Debug)
221
222 if len(info.Plugins) > 0 {
223 fprintln(streams.Out(), " Plugins:")
224 for _, p := range info.Plugins {
225 if p.Err == nil {
226 fprintf(streams.Out(), " %s: %s (%s)\n", p.Name, p.ShortDescription, p.Vendor)
227 fprintlnNonEmpty(streams.Out(), " Version: ", p.Version)
228 fprintlnNonEmpty(streams.Out(), " Path: ", p.Path)
229 } else {
230 info.Warnings = append(info.Warnings, fmt.Sprintf("WARNING: Plugin %q is not valid: %s", p.Path, p.Err))
231 }
232 }
233 }
234
235 if len(info.Warnings) > 0 {
236 fprintln(streams.Err(), strings.Join(info.Warnings, "\n"))
237 }
238}
239
240//nolint:gocyclo
241func prettyPrintServerInfo(streams command.Streams, info *dockerInfo) {

Callers 1

prettyPrintInfoFunction · 0.85

Calls 5

fprintlnNonEmptyFunction · 0.85
fprintlnFunction · 0.85
fprintfFunction · 0.85
OutMethod · 0.65
ErrMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…