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

Function longUpdateDescription

cli/command/context/update.go:21–32  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

19}
20
21func longUpdateDescription() string {
22 buf := bytes.NewBuffer(nil)
23 buf.WriteString("Update a context\n\nDocker endpoint config:\n\n")
24 tw := tabwriter.NewWriter(buf, 20, 1, 3, ' ', 0)
25 _, _ = fmt.Fprintln(tw, "NAME\tDESCRIPTION")
26 for _, d := range dockerConfigKeysDescriptions {
27 _, _ = fmt.Fprintf(tw, "%s\t%s\n", d.name, d.description)
28 }
29 _ = tw.Flush()
30 buf.WriteString("\nExample:\n\n$ docker context update my-context --description \"some description\" --docker \"host=tcp://myserver:2376,ca=~/ca-file,cert=~/cert-file,key=~/key-file\"\n")
31 return buf.String()
32}
33
34func newUpdateCommand(dockerCLI command.Cli) *cobra.Command {
35 opts := updateOptions{}

Callers 1

newUpdateCommandFunction · 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…