MCPcopy
hub / github.com/docker/compose / runVersion

Function runVersion

cmd/compose/version.go:59–69  ·  view source on GitHub ↗
(opts versionOptions, dockerCli command.Cli)

Source from the content-addressed store, hash-verified

57}
58
59func runVersion(opts versionOptions, dockerCli command.Cli) {
60 if opts.short {
61 _, _ = fmt.Fprintln(dockerCli.Out(), strings.TrimPrefix(internal.Version, "v"))
62 return
63 }
64 if opts.format == formatter.JSON {
65 _, _ = fmt.Fprintf(dockerCli.Out(), "{\"version\":%q}\n", internal.Version)
66 return
67 }
68 _, _ = fmt.Fprintln(dockerCli.Out(), "Docker Compose version", internal.Version)
69}

Callers 1

versionCommandFunction · 0.85

Calls 1

OutMethod · 0.45

Tested by

no test coverage detected