()
| 19 | } |
| 20 | |
| 21 | func 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 | |
| 34 | func newUpdateCommand(dockerCLI command.Cli) *cobra.Command { |
| 35 | opts := updateOptions{} |
no test coverage detected
searching dependent graphs…