Skip to content

Commit

Permalink
Merge pull request #531 from oom-ai/more-detailed-help
Browse files Browse the repository at this point in the history
doc: more detailed --help
  • Loading branch information
YikSanChan committed Nov 18, 2021
2 parents 6e1cf67 + 8271909 commit ac1343a
Show file tree
Hide file tree
Showing 10 changed files with 14 additions and 18 deletions.
2 changes: 1 addition & 1 deletion featctl/cmd/describe_entity.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (
)

var describeEntityCmd = &cobra.Command{
Use: "entity",
Use: "entity <entity_name>",
Short: "show details of a specific entity",
Args: cobra.ExactArgs(1),
Run: func(cmd *cobra.Command, args []string) {
Expand Down
2 changes: 1 addition & 1 deletion featctl/cmd/describe_feature.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (
)

var describeFeatureCmd = &cobra.Command{
Use: "feature",
Use: "feature <feature_name>",
Short: "show details of a specific feature",
Args: cobra.ExactArgs(1),
Run: func(cmd *cobra.Command, args []string) {
Expand Down
2 changes: 1 addition & 1 deletion featctl/cmd/describe_group.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (
)

var describeGroupCmd = &cobra.Command{
Use: "group",
Use: "group <group_name>",
Short: "show details of a specific group",
Args: cobra.ExactArgs(1),
Run: func(cmd *cobra.Command, args []string) {
Expand Down
3 changes: 0 additions & 3 deletions featctl/cmd/list_group.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,6 @@ var listGroupOpt listGroupOption
var listGroupCmd = &cobra.Command{
Use: "group",
Short: "list feature groups",
Example: `1. featctl list group
2. featctl list group --entity device
`,
PreRun: func(cmd *cobra.Command, args []string) {
if !cmd.Flags().Changed("entity") {
listGroupOpt.entityName = nil
Expand Down
7 changes: 3 additions & 4 deletions featctl/cmd/register_batch_feature.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,9 @@ import (

var registerBatchFeatureOpt types.CreateFeatureOpt
var registerBatchFeatureCmd = &cobra.Command{
Use: "batch-feature",
Short: "register a new batch feature",
Example: `featctl register feature model --group device --value-type "varchar(30)" --description 'phone model'`,
Args: cobra.ExactArgs(1),
Use: "batch-feature <feature_name>",
Short: "register a new batch feature",
Args: cobra.ExactArgs(1),
PreRun: func(cmd *cobra.Command, args []string) {
registerBatchFeatureOpt.FeatureName = args[0]
},
Expand Down
2 changes: 1 addition & 1 deletion featctl/cmd/register_entity.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import (
var registerEntityOpt types.CreateEntityOpt

var registerEntityCmd = &cobra.Command{
Use: "entity",
Use: "entity <entity_name>",
Short: "register a new entity",
Args: cobra.ExactArgs(1),
PreRun: func(cmd *cobra.Command, args []string) {
Expand Down
2 changes: 1 addition & 1 deletion featctl/cmd/register_group.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (

var registerGroupOpt types.CreateGroupOpt
var registerGroupCmd = &cobra.Command{
Use: "group",
Use: "group <group_name>",
Short: "register a new feature group",
Args: cobra.ExactArgs(1),
PreRun: func(cmd *cobra.Command, args []string) {
Expand Down
4 changes: 2 additions & 2 deletions featctl/cmd/update_entity.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ import (
var updateEntityOpt types.UpdateEntityOpt

var updateEntityCmd = &cobra.Command{
Use: "entity",
Short: "update a specified entity",
Use: "entity <entity_name>",
Short: "update a particular entity",
Args: cobra.ExactArgs(1),
PreRun: func(cmd *cobra.Command, args []string) {
updateEntityOpt.EntityName = args[0]
Expand Down
4 changes: 2 additions & 2 deletions featctl/cmd/update_feature.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ import (
var updateFeatureOpt types.UpdateFeatureOpt

var updateFeatureCmd = &cobra.Command{
Use: "feature",
Short: "update a specified feature",
Use: "feature <feature_name>",
Short: "update a particular feature",
Args: cobra.ExactArgs(1),
PreRun: func(cmd *cobra.Command, args []string) {
updateFeatureOpt.FeatureName = args[0]
Expand Down
4 changes: 2 additions & 2 deletions featctl/cmd/update_group.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ import (
var updateGroupOpt types.UpdateGroupOpt

var updateGroupCmd = &cobra.Command{
Use: "group",
Short: "update a specified group",
Use: "group <group_name>",
Short: "update a particular group",
Args: cobra.ExactArgs(1),
PreRun: func(cmd *cobra.Command, args []string) {
updateGroupOpt.GroupName = args[0]
Expand Down

0 comments on commit ac1343a

Please sign in to comment.