mirror of
https://github.com/spf13/cobra
synced 2025-04-28 09:37:17 +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
|
```go
|
||||||
package main
|
package main
|
||||||
|
|
||||||
import (
|
import "{pathToYourApp}/cmd"
|
||||||
"{pathToYourApp}/cmd"
|
|
||||||
)
|
|
||||||
|
|
||||||
func main() {
|
func main() {
|
||||||
cmd.Execute()
|
cmd.Execute()
|
||||||
|
@ -148,9 +146,7 @@ In a Cobra app, typically the main.go file is very bare. It serves one purpose:
|
||||||
```go
|
```go
|
||||||
package main
|
package main
|
||||||
|
|
||||||
import (
|
import "{pathToYourApp}/cmd"
|
||||||
"{pathToYourApp}/cmd"
|
|
||||||
)
|
|
||||||
|
|
||||||
func main() {
|
func main() {
|
||||||
cmd.Execute()
|
cmd.Execute()
|
||||||
|
|
Loading…
Add table
Reference in a new issue