Documentation ¶
Overview ¶
Package cmd handles the terminal interface, user flags and arguments.
Index ¶
- Constants
- Variables
- func Dec() *cobra.Command
- func DecInit() *cobra.Command
- func DumpCommand() *cobra.Command
- func Execute() error
- func Hex() *cobra.Command
- func HexInit() *cobra.Command
- func InfoCommand() *cobra.Command
- func InfoInit() *cobra.Command
- func Language() *cobra.Command
- func ListCodepage() *cobra.Command
- func ListExample() *cobra.Command
- func Table() *cobra.Command
- func Tables() *cobra.Command
- func Tester(c *cobra.Command) *cobra.Command
- func ViewCommand() *cobra.Command
- func ViewInit() *cobra.Command
Constants ¶
View Source
const ( IDcodepage = "idcp" // codepage group IDfile = "idfile" // file group IDsample = "idsample" // sample group )
ID are the cobra command group IDs.
Variables ¶
View Source
var ( ErrHide = errors.New("could not hide the flag") ErrUsage = errors.New("command usage could not display") )
View Source
var Cmd = base()
Cmd represents the base command when called without any subcommands.
Functions ¶
func DumpCommand ¶ added in v0.9.0
func Execute ¶
func Execute() error
Execute adds all child commands to the root command and sets flags appropriately. This is called by main.main(). It only needs to happen once to the rootCmd.
func InfoCommand ¶
func ListCodepage ¶ added in v0.2.0
func ListExample ¶ added in v0.2.0
func Tester ¶
Tester creates and hides a custom tester flag. It is its own function so it can also be applied to unit tests as well as init.
func ViewCommand ¶
Types ¶
This section is empty.
Source Files ¶
Directories ¶
Path | Synopsis |
---|---|
Package example provides help usage examples for the cmd package.
|
Package example provides help usage examples for the cmd package. |
Package hexa provides rudimental hexadecimal conversion functions.
|
Package hexa provides rudimental hexadecimal conversion functions. |
internal
|
|
flag
Package flag provides the command flags handlers.
|
Package flag provides the command flags handlers. |
format
Package format handles the text output, syntax options.
|
Package format handles the text output, syntax options. |
info
Package info provides the info command run function.
|
Package info provides the info command run function. |
view
Package view provides the view command run function.
|
Package view provides the view command run function. |
Package list provides the list command run function.
|
Package list provides the list command run function. |
Package online is for simple HTTP interactions with the GitHub API.
|
Package online is for simple HTTP interactions with the GitHub API. |
Package update provides the ability to check GitHub for the newest release tag.
|
Package update provides the ability to check GitHub for the newest release tag. |
Package version provides the stdout template for the version flag.
|
Package version provides the stdout template for the version flag. |
Click to show internal directories.
Click to hide internal directories.