()
| 29 | } |
| 30 | |
| 31 | func 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 | |
| 44 | func newCreateCommand(dockerCLI command.Cli) *cobra.Command { |
| 45 | opts := createOptions{} |
no test coverage detected
searching dependent graphs…