equal
deleted
inserted
replaced
16 ) |
16 ) |
17 |
17 |
18 var configCmd = &cobra.Command{ |
18 var configCmd = &cobra.Command{ |
19 Use: "config", |
19 Use: "config", |
20 Short: "Display configuration", |
20 Short: "Display configuration", |
|
21 Long: `Display configuration |
|
22 |
|
23 Display current configuration. You can use this command to generate an |
|
24 initial configuration file (see the examples below). |
|
25 |
|
26 This command is disabled if the safe_mode setting is set to true in the |
|
27 configuration file.`, |
|
28 Example: ` madonctl config dump -i INSTANCE -L USERNAME -P PASS > config.yaml |
|
29 madonctl whoami |
|
30 madonctl whoami --template '{{.access_token}}'`, |
21 } |
31 } |
22 |
32 |
23 func init() { |
33 func init() { |
24 RootCmd.AddCommand(configCmd) |
34 RootCmd.AddCommand(configCmd) |
25 |
35 |
27 configCmd.AddCommand(configSubcommands...) |
37 configCmd.AddCommand(configSubcommands...) |
28 } |
38 } |
29 |
39 |
30 var configSubcommands = []*cobra.Command{ |
40 var configSubcommands = []*cobra.Command{ |
31 &cobra.Command{ |
41 &cobra.Command{ |
32 Use: "dump", |
42 Use: "dump", |
33 Short: "Dump the configuration", |
43 Short: "Dump the configuration", |
|
44 Example: ` madonctl config dump -i INSTANCE -L USERNAME -P PASS > config.yaml`, |
34 RunE: func(cmd *cobra.Command, args []string) error { |
45 RunE: func(cmd *cobra.Command, args []string) error { |
35 return configDump() |
46 return configDump() |
36 }, |
47 }, |
37 }, |
48 }, |
38 &cobra.Command{ |
49 &cobra.Command{ |