cli

package
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 21, 2020 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewRootCommand

func NewRootCommand(name string, version string) *cobra.Command

NewRootCommand is used to create a new instance of a cobra.Command. This function takes a name and version as input. It returns a command of type cobra.Command.

func NewSubCommand

func NewSubCommand(root *cobra.Command, name string, run func(cmd *cobra.Command, args []string))

NewSubCommand is used to add a new sub command to a cobra.Command. This function takes a root command, name and run function as input. The run function will be invoked when the command is executed and all the flags pass validation.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL