mirror of
https://github.com/spf13/cobra
synced 2024-11-24 14:47:12 +00:00
Update README with missing import statements (#373)
This commit is contained in:
parent
b62566898a
commit
de09d9ce07
1 changed files with 12 additions and 2 deletions
14
README.md
14
README.md
|
@ -157,7 +157,12 @@ In a Cobra app, typically the main.go file is very bare. It serves, one purpose,
|
||||||
```go
|
```go
|
||||||
package main
|
package main
|
||||||
|
|
||||||
import "{pathToYourApp}/cmd"
|
import (
|
||||||
|
"fmt"
|
||||||
|
"os"
|
||||||
|
|
||||||
|
"{pathToYourApp}/cmd"
|
||||||
|
)
|
||||||
|
|
||||||
func main() {
|
func main() {
|
||||||
if err := cmd.RootCmd.Execute(); err != nil {
|
if err := cmd.RootCmd.Execute(); err != nil {
|
||||||
|
@ -313,7 +318,12 @@ In a Cobra app, typically the main.go file is very bare. It serves, one purpose,
|
||||||
```go
|
```go
|
||||||
package main
|
package main
|
||||||
|
|
||||||
import "{pathToYourApp}/cmd"
|
import (
|
||||||
|
"fmt"
|
||||||
|
"os"
|
||||||
|
|
||||||
|
"{pathToYourApp}/cmd"
|
||||||
|
)
|
||||||
|
|
||||||
func main() {
|
func main() {
|
||||||
if err := cmd.RootCmd.Execute(); err != nil {
|
if err := cmd.RootCmd.Execute(); err != nil {
|
||||||
|
|
Loading…
Reference in a new issue