Skip to content

Commit eecaee0

Browse files
committed
Rename inspect to describe
This matches the UX for the describe command for functions and makes the experience less confusing for new users. The same templates also work in the same way, so now all three are consistent. Signed-off-by: Alex Ellis (OpenFaaS Ltd) <[email protected]>
1 parent f0e58c8 commit eecaee0

File tree

1 file changed

+9
-8
lines changed

1 file changed

+9
-8
lines changed

commands/store_inspect.go renamed to commands/store_describe.go

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -14,20 +14,21 @@ import (
1414

1515
func init() {
1616
// Setup flags used by store command
17-
storeInspectCmd.Flags().BoolVarP(&verbose, "verbose", "v", false, "Verbose output for the field values")
17+
storeDescribeCmd.Flags().BoolVarP(&verbose, "verbose", "v", false, "Verbose output for the field values")
1818

19-
storeCmd.AddCommand(storeInspectCmd)
19+
storeCmd.AddCommand(storeDescribeCmd)
2020
}
2121

22-
var storeInspectCmd = &cobra.Command{
23-
Use: `inspect (FUNCTION_NAME|FUNCTION_TITLE) [--url STORE_URL]`,
22+
var storeDescribeCmd = &cobra.Command{
23+
Use: `describe (FUNCTION_NAME|FUNCTION_TITLE) [--url STORE_URL]`,
2424
Short: "Show details of OpenFaaS function from a store",
25-
Example: ` faas-cli store inspect NodeInfo
26-
faas-cli store inspect NodeInfo --url https://domain:port/store.json`,
27-
RunE: runStoreInspect,
25+
Example: ` faas-cli store describe NodeInfo
26+
faas-cli store describe NodeInfo --url https://domain:port/store.json`,
27+
Aliases: []string{"inspect"},
28+
RunE: runStoreDescribe,
2829
}
2930

30-
func runStoreInspect(cmd *cobra.Command, args []string) error {
31+
func runStoreDescribe(cmd *cobra.Command, args []string) error {
3132
if len(args) < 1 {
3233
return fmt.Errorf("please provide the function name")
3334
}

0 commit comments

Comments
 (0)