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

Function longCreateDescription

cli/command/context/create.go:31–42  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

29}
30
31func longCreateDescription() string {
32 buf := bytes.NewBuffer(nil)
33 buf.WriteString("Create a context\n\nDocker endpoint config:\n\n")
34 tw := tabwriter.NewWriter(buf, 20, 1, 3, ' ', 0)
35 _, _ = fmt.Fprintln(tw, "NAME\tDESCRIPTION")
36 for _, d := range dockerConfigKeysDescriptions {
37 _, _ = fmt.Fprintf(tw, "%s\t%s\n", d.name, d.description)
38 }
39 _ = tw.Flush()
40 buf.WriteString("\nExample:\n\n$ docker context create my-context --description \"some description\" --docker \"host=tcp://myserver:2376,ca=~/ca-file,cert=~/cert-file,key=~/key-file\"\n")
41 return buf.String()
42}
43
44func newCreateCommand(dockerCLI command.Cli) *cobra.Command {
45 opts := createOptions{}

Callers 1

newCreateCommandFunction · 0.85

Calls 2

FlushMethod · 0.95
StringMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…