From 0007dce7f7aef297e955a9e196627f5032910448 Mon Sep 17 00:00:00 2001 From: dimas Date: Fri, 22 Oct 2021 01:29:53 +0700 Subject: [PATCH] fixing numbering in project-layout and source docs for consistency. --- docs/project-layout.md | 8 ++++---- docs/source.md | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/docs/project-layout.md b/docs/project-layout.md index 60d0c2aac0c..89337596a3c 100644 --- a/docs/project-layout.md +++ b/docs/project-layout.md @@ -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 diff --git a/docs/source.md b/docs/source.md index a8225c3713f..485c7671cb7 100644 --- a/docs/source.md +++ b/docs/source.md @@ -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.