fixing numbering in project-layout and source docs for consistency.
This commit is contained in:
parent
e9dafd7c32
commit
0007dce7f7
2 changed files with 8 additions and 8 deletions
|
|
@ -60,14 +60,14 @@ and talk through which code gets run in order.
|
|||
|
||||
## How to add a new command
|
||||
|
||||
0. First, check on our issue tracker to verify that our team had approved the plans for a new command.
|
||||
1. Create a package for the new command, e.g. for a new command `gh boom` create the following directory
|
||||
1. First, check on our issue tracker to verify that our team had approved the plans for a new command.
|
||||
2. Create a package for the new command, e.g. for a new command `gh boom` create the following directory
|
||||
structure: `pkg/cmd/boom/`
|
||||
2. The new package should expose a method, e.g. `NewCmdBoom()`, that accepts a `*cmdutil.Factory` type and
|
||||
3. The new package should expose a method, e.g. `NewCmdBoom()`, that accepts a `*cmdutil.Factory` type and
|
||||
returns a `*cobra.Command`.
|
||||
* Any logic specific to this command should be kept within the command's package and not added to any
|
||||
"global" packages like `api` or `utils`.
|
||||
3. Use the method from the previous step to generate the command and add it to the command tree, typically
|
||||
4. Use the method from the previous step to generate the command and add it to the command tree, typically
|
||||
somewhere in the `NewCmdRoot()` method.
|
||||
|
||||
## How to write tests
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
# Installation from source
|
||||
|
||||
0. Verify that you have Go 1.16+ installed
|
||||
1. Verify that you have Go 1.16+ installed
|
||||
|
||||
```sh
|
||||
$ go version
|
||||
|
|
@ -8,14 +8,14 @@
|
|||
|
||||
If `go` is not installed, follow instructions on [the Go website](https://golang.org/doc/install).
|
||||
|
||||
1. Clone this repository
|
||||
2. Clone this repository
|
||||
|
||||
```sh
|
||||
$ git clone https://github.com/cli/cli.git gh-cli
|
||||
$ cd gh-cli
|
||||
```
|
||||
|
||||
2. Build and install
|
||||
3. Build and install
|
||||
|
||||
#### Unix-like systems
|
||||
```sh
|
||||
|
|
@ -33,7 +33,7 @@
|
|||
```
|
||||
There is no install step available on Windows.
|
||||
|
||||
3. Run `gh version` to check if it worked.
|
||||
4. Run `gh version` to check if it worked.
|
||||
|
||||
#### Windows
|
||||
Run `bin\gh version` to check if it worked.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue