Documentation ¶
Index ¶
- Variables
- func CheckErr(err error)
- func CheckForUpdates() error
- func CheckUpdateExit()
- func Err() io.Writer
- func FlagErrorFunc() func(*cobra.Command, error) error
- func GetCiCommand() *cobra.Command
- func GlobalNormalizationFunc() func(f *pflag.FlagSet, name string) pflag.NormalizedName
- func HelpFunc() func(*cobra.Command, []string)
- func HelpTemplate() string
- func PcliOut() io.Writer
- func SetRepo(repo string) error
- func SetRootCmd(cmd *cobra.Command)
- func Setup()
- func UsageFunc() func(*cobra.Command) error
- func UsageTemplate() string
- func VersionTemplate() string
- type MarkdownDocument
Constants ¶
This section is empty.
Variables ¶
var AppInfo = meta{}
var DisableUpdateChecking = false
DisableUpdateChecking automatically checks if a new version of your application is pushed, and notifies the user.
var HelpSectionPrinter = pterm.DefaultSection.WithLevel(2).Sprint
HelpSectionPrinter is used to print the different sections in the CLIs help output. You can overwrite it with any Sprint function.
Functions ¶
func CheckForUpdates ¶
func CheckForUpdates() error
CheckForUpdates checks if a new version of your application is pushed, and notifies the user, if DisableUpdateChecking is true.
func CheckUpdateExit ¶ added in v0.4.8
func CheckUpdateExit()
func FlagErrorFunc ¶
FlagErrorFunc is a drop in replacement for spf13/cobra `FlagErrorFunc`
func GetCiCommand ¶
GetCiCommand returns a custom crafted CI command. This must be used when using https://github.com/x0f5c3/cli-template.
func GlobalNormalizationFunc ¶
func GlobalNormalizationFunc() func(f *pflag.FlagSet, name string) pflag.NormalizedName
GlobalNormalizationFunc is a drop in replacement for spf13/cobra `GlobalNormalizationFunc`
func HelpTemplate ¶
func HelpTemplate() string
HelpTemplate is a drop in replacement for spf13/cobra `HelpTemplate`
func UsageTemplate ¶
func UsageTemplate() string
UsageTemplate is a drop in replacement for spf13/cobra `UsageTemplate`
func VersionTemplate ¶
func VersionTemplate() string
VersionTemplate is a drop in replacement for spf13/cobra `VersionTemplate`
Types ¶
type MarkdownDocument ¶
MarkdownDocument contains the command and it's markdown documentation.
func GenerateMarkdownDoc ¶
func GenerateMarkdownDoc(command *cobra.Command) (markdown MarkdownDocument)
GenerateMarkdownDoc walks trough every subcommand of rootCmd and creates a documentation written in Markdown for it.