Skip to content

Commit

Permalink
update-generator-docs - update to reflect changes
Browse files Browse the repository at this point in the history
Update Generator Docs to reflect changes brought in spf13#817
  • Loading branch information
jharshman committed Jul 12, 2019
1 parent 21f39ca commit 80f206c
Showing 1 changed file with 16 additions and 3 deletions.
19 changes: 16 additions & 3 deletions cobra/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,24 @@ for you. It is a very powerful application that will populate your program with
the right structure so you can immediately enjoy all the benefits of Cobra. It
will also automatically apply the license you specify to your application.

Cobra init is pretty smart. You can provide it a full path, or simply a path
similar to what is expected in the import.
Cobra init is pretty smart. You can either run it in your current application directory
or you can specify a path to an existing project. If the directory you point it at does not
exist, it will be created for you.

Updates to the Cobra generator have now decoupled it from the GOPATH.
As such `--pkg-name` is required.

> Note: init will no longer fail on non-empty directories.
```
mkdir -p newApp && cd newApp
cobra init --pkg-name github.com/spf13/newApp
```

or

```
cobra init github.com/spf13/newApp
cobra init --pkg-name github.com/spf13/newApp path/to/newApp
```

### cobra add
Expand Down

0 comments on commit 80f206c

Please sign in to comment.