mirror of
https://github.com/spf13/cobra
synced 2025-04-27 09:07:19 +00:00
Use single import line in the trivial examples
When we want to show a minimal example with single import it looks cleaner and more minimal with a single line.
This commit is contained in:
parent
08fa116823
commit
612f06f846
1 changed files with 2 additions and 6 deletions
|
@ -18,9 +18,7 @@ In a Cobra app, typically the main.go file is very bare. It serves one purpose:
|
|||
```go
|
||||
package main
|
||||
|
||||
import (
|
||||
"{pathToYourApp}/cmd"
|
||||
)
|
||||
import "{pathToYourApp}/cmd"
|
||||
|
||||
func main() {
|
||||
cmd.Execute()
|
||||
|
@ -148,9 +146,7 @@ In a Cobra app, typically the main.go file is very bare. It serves one purpose:
|
|||
```go
|
||||
package main
|
||||
|
||||
import (
|
||||
"{pathToYourApp}/cmd"
|
||||
)
|
||||
import "{pathToYourApp}/cmd"
|
||||
|
||||
func main() {
|
||||
cmd.Execute()
|
||||
|
|
Loading…
Add table
Reference in a new issue