Skip to content

Commit

Permalink
rename variables
Browse files Browse the repository at this point in the history
  • Loading branch information
syamgk committed Aug 23, 2018
1 parent c099785 commit 348a26b
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
12 changes: 6 additions & 6 deletions cmd/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ var configurationCmd = &cobra.Command{
Short: "Modifies configuration settings",
Long: `Modifies Odo specific configuration settings within the config file.`,
Example: fmt.Sprintf("%s\n%s\n",
configurationGetCmd.Example,
configurationViewCmd.Example,
configurationSetCmd.Example),
Aliases: []string{"configuration"},
// 'odo utils config' is the same as 'odo utils config view'
Expand All @@ -31,9 +31,9 @@ var configurationCmd = &cobra.Command{
if len(args) > 0 && args[0] == "set" {
configurationSetCmd.Run(cmd, args)
} else if len(args) > 0 && args[0] == "view" {
configurationGetCmd.Run(cmd, args)
configurationViewCmd.Run(cmd, args)
} else {
configurationGetCmd.Run(cmd, args)
configurationViewCmd.Run(cmd, args)
}
},
}
Expand Down Expand Up @@ -67,11 +67,11 @@ var configurationSetCmd = &cobra.Command{
},
}

var configurationGetCmd = &cobra.Command{
var configurationViewCmd = &cobra.Command{
Use: "view",
Short: "View current value",
Short: "View current values",
Long: "View current configuration",
Example: ` # Get the current configuration
Example: ` # For viewing the current configuration
odo utils config view`,
Args: cobra.ExactArgs(0),
Run: func(cmd *cobra.Command, args []string) {
Expand Down
4 changes: 2 additions & 2 deletions cmd/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,14 @@ var utilsCmd = &cobra.Command{
completionCmd.Example,
terminalCmd.Example,
configurationSetCmd.Example,
configurationGetCmd.Example),
configurationViewCmd.Example),
}

func init() {
utilsCmd.Annotations = map[string]string{"command": "utility"}
utilsCmd.SetUsageTemplate(cmdUsageTemplate)

configurationCmd.AddCommand(configurationGetCmd)
configurationCmd.AddCommand(configurationViewCmd)
configurationCmd.AddCommand(configurationSetCmd)

configurationCmd.SetUsageTemplate(cmdUsageTemplate)
Expand Down

0 comments on commit 348a26b

Please sign in to comment.