Generate user guide command links
This PS adds docs.airshipit.org link to long description of the airshipctl root command output. The implementation is done in-line with kubectl command. https://github.com/kubernetes/kubectl/blob/master/pkg/cmd/cmd.go#L479 Closes: #281 Change-Id: Id65c53a72a840221c47677bacf9651f9430da276
This commit is contained in:
parent
a7cbd6bddc
commit
ed0fee91b1
@ -34,6 +34,11 @@ import (
|
||||
"opendev.org/airship/airshipctl/pkg/log"
|
||||
)
|
||||
|
||||
const longRoot = `A unified entrypoint to various airship components
|
||||
|
||||
Find more information at: https://docs.airshipit.org/airshipctl/
|
||||
`
|
||||
|
||||
// RootOptions stores global flags values
|
||||
type RootOptions struct {
|
||||
Debug bool
|
||||
@ -54,6 +59,7 @@ func NewRootCommand(out io.Writer) (*cobra.Command, *RootOptions) {
|
||||
rootCmd := &cobra.Command{
|
||||
Use: "airshipctl",
|
||||
Short: "A unified entrypoint to various airship components",
|
||||
Long: longRoot,
|
||||
SilenceErrors: true,
|
||||
SilenceUsage: true,
|
||||
PersistentPreRun: func(cmd *cobra.Command, args []string) {
|
||||
|
@ -1,5 +1,7 @@
|
||||
A unified entrypoint to various airship components
|
||||
|
||||
Find more information at: https://docs.airshipit.org/airshipctl/
|
||||
|
||||
Usage:
|
||||
airshipctl [command]
|
||||
|
||||
|
@ -1,2 +1,4 @@
|
||||
A unified entrypoint to various airship components
|
||||
|
||||
Find more information at: https://docs.airshipit.org/airshipctl/
|
||||
|
||||
|
@ -1,5 +1,7 @@
|
||||
A unified entrypoint to various airship components
|
||||
|
||||
Find more information at: https://docs.airshipit.org/airshipctl/
|
||||
|
||||
Usage:
|
||||
airshipctl [command]
|
||||
|
||||
|
@ -6,6 +6,9 @@ A unified entrypoint to various airship components
|
||||
|
||||
A unified entrypoint to various airship components
|
||||
|
||||
Find more information at: https://docs.airshipit.org/airshipctl/
|
||||
|
||||
|
||||
### Options
|
||||
|
||||
```
|
||||
|
Loading…
Reference in New Issue
Block a user