Skip to content

Commit

Permalink
Merge pull request #39 from zalmarge/master
Browse files Browse the repository at this point in the history
Fix documentation for BGP flag in `project create`.
  • Loading branch information
zalmarge authored Apr 25, 2024
2 parents 1cecb60 + 15104f1 commit 13ca4c7
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions docs/cherryctl_project_create.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,14 @@ cherryctl project create -t <team_id> --name <project_name> [--bgp <bool>] [flag
### Examples

```
# To create a new project with BGP enabled:
cherryctl project create -t 12345 --name "Project with BGP" --bgp true
# To create a new project with BGP support enabled:
cherryctl project create -t 12345 --name "Project with BGP" --bgp
```

### Options

```
-b, --bgp True to enable BGP in a project.
-b, --bgp Enable BGP support.
-h, --help help for create
--name string Project name.
-t, --team-id int The teams's ID.
Expand Down
6 changes: 3 additions & 3 deletions internal/projects/create.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ func (c *Client) Create() *cobra.Command {
Use: `create -t <team_id> --name <project_name> [--bgp <bool>]`,
Short: "Create a project.",
Long: "Create a new project in a speficied team.",
Example: ` # To create a new project with BGP enabled:
cherryctl project create -t 12345 --name "Project with BGP" --bgp true`,
Example: ` # To create a new project with BGP support enabled:
cherryctl project create -t 12345 --name "Project with BGP" --bgp`,

RunE: func(cmd *cobra.Command, args []string) error {
cmd.SilenceUsage = true
Expand All @@ -43,7 +43,7 @@ func (c *Client) Create() *cobra.Command {
}

projectCreateCmd.Flags().IntVarP(&teamID, "team-id", "t", 0, "The teams's ID.")
projectCreateCmd.Flags().BoolVarP(&bgp, "bgp", "b", false, "True to enable BGP in a project.")
projectCreateCmd.Flags().BoolVarP(&bgp, "bgp", "b", false, "Enable BGP support.")
projectCreateCmd.Flags().StringVarP(&name, "name", "", "", "Project name.")

projectCreateCmd.MarkFlagRequired("team-id")
Expand Down

0 comments on commit 13ca4c7

Please sign in to comment.