From d638dcb7c7c1c9b62f3a6297a17834980d245dc7 Mon Sep 17 00:00:00 2001 From: Johanan Lieberman Date: Fri, 23 Jun 2017 20:34:30 +0300 Subject: [PATCH] Improve readability of README Improve punctuation, fix capitalization in a couple of places and rephrase some sentences for better readability. --- README.md | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index 2772e626..f1eef779 100644 --- a/README.md +++ b/README.md @@ -140,8 +140,8 @@ import "github.com/spf13/cobra" # Getting Started -While you are welcome to provide your own organization, typically a Cobra based -application will follow the following organizational structure. +While you are welcome to provide your own organization, typically a Cobra-based +application will follow the following organizational structure: ``` ▾ appName/ @@ -153,7 +153,7 @@ application will follow the following organizational structure. main.go ``` -In a Cobra app, typically the main.go file is very bare. It serves, one purpose, to initialize Cobra. +In a Cobra app, typically the main.go file is very bare. It serves one purpose: initializing Cobra. ```go package main @@ -219,7 +219,8 @@ cobra add create -p 'configCmd' Otherwise, you will encounter errors. For example, `cobra add add-user` is incorrect, but `cobra add addUser` is valid.* -Once you have run these three commands you would have an app structure that would look like: +Once you have run these three commands you would have an app structure similar to +the following: ``` ▾ app/ @@ -232,14 +233,14 @@ Once you have run these three commands you would have an app structure that woul At this point you can run `go run main.go` and it would run your app. `go run main.go serve`, `go run main.go config`, `go run main.go config create` along -with `go run main.go help serve`, etc would all work. +with `go run main.go help serve`, etc. would all work. -Obviously you haven't added your own code to these yet, the commands are ready +Obviously you haven't added your own code to these yet. The commands are ready for you to give them their tasks. Have fun! ### Configuring the cobra generator -The cobra generator will be easier to use if you provide a simple configuration +The Cobra generator will be easier to use if you provide a simple configuration file which will help you eliminate providing a bunch of repeated information in flags over and over. @@ -269,7 +270,7 @@ You can also use built-in licenses. For example, **GPLv2**, **GPLv3**, **LGPL**, ## Manually implementing Cobra -To manually implement cobra you need to create a bare main.go file and a RootCmd file. +To manually implement Cobra you need to create a bare main.go file and a RootCmd file. You will optionally provide additional commands as you see fit. ### Create the root command