mirror of
https://github.com/rancher/rke.git
synced 2025-09-16 23:20:56 +00:00
vendor update
This commit is contained in:
committed by
Alena Prokharchyk
parent
dd4faabd6c
commit
7582083e7a
25
vendor/github.com/spf13/cobra/man_docs.md
generated
vendored
Normal file
25
vendor/github.com/spf13/cobra/man_docs.md
generated
vendored
Normal file
@@ -0,0 +1,25 @@
|
||||
# Generating Man Pages For Your Own cobra.Command
|
||||
|
||||
Generating man pages from a cobra command is incredibly easy. An example is as follows:
|
||||
|
||||
```go
|
||||
package main
|
||||
|
||||
import (
|
||||
"github.com/spf13/cobra"
|
||||
)
|
||||
|
||||
func main() {
|
||||
cmd := &cobra.Command{
|
||||
Use: "test",
|
||||
Short: "my test program",
|
||||
}
|
||||
header := &cobra.GenManHeader{
|
||||
Title: "MINE",
|
||||
Section: "3",
|
||||
}
|
||||
cmd.GenManTree(header, "/tmp")
|
||||
}
|
||||
```
|
||||
|
||||
That will get you a man page `/tmp/test.1`
|
Reference in New Issue
Block a user