Commit 80f206c 1 parent 21f39ca commit 80f206c Copy full SHA for 80f206c
File tree 1 file changed +16
-3
lines changed
1 file changed +16
-3
lines changed Original file line number Diff line number Diff line change @@ -16,11 +16,24 @@ for you. It is a very powerful application that will populate your program with
16
16
the right structure so you can immediately enjoy all the benefits of Cobra. It
17
17
will also automatically apply the license you specify to your application.
18
18
19
- Cobra init is pretty smart. You can provide it a full path, or simply a path
20
- similar to what is expected in the import.
19
+ Cobra init is pretty smart. You can either run it in your current application directory
20
+ or you can specify a path to an existing project. If the directory you point it at does not
21
+ exist, it will be created for you.
22
+
23
+ Updates to the Cobra generator have now decoupled it from the GOPATH.
24
+ As such ` --pkg-name ` is required.
25
+
26
+ > Note: init will no longer fail on non-empty directories.
27
+
28
+ ```
29
+ mkdir -p newApp && cd newApp
30
+ cobra init --pkg-name github.com/spf13/newApp
31
+ ```
32
+
33
+ or
21
34
22
35
```
23
- cobra init github.com/spf13/newApp
36
+ cobra init --pkg-name github.com/spf13/newApp path/to /newApp
24
37
```
25
38
26
39
### cobra add
You can’t perform that action at this time.
0 commit comments