cmd

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Jan 10, 2024 License: LGPL-3.0 Imports: 20 Imported by: 0

Documentation

Overview

Package cmd handles the terminal interface, user flags and arguments.

Index

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 Dec added in v0.8.0

func Dec() *cobra.Command

func DecInit added in v0.8.0

func DecInit() *cobra.Command

func DumpCommand added in v0.9.0

func DumpCommand() *cobra.Command

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 Hex added in v0.8.0

func Hex() *cobra.Command

func HexInit added in v0.8.0

func HexInit() *cobra.Command

func InfoCommand

func InfoCommand() *cobra.Command

func InfoInit

func InfoInit() *cobra.Command

func Language added in v0.3.0

func Language() *cobra.Command

func ListCodepage added in v0.2.0

func ListCodepage() *cobra.Command

func ListExample added in v0.2.0

func ListExample() *cobra.Command

func Table

func Table() *cobra.Command

func Tables

func Tables() *cobra.Command

func Tester

func Tester(c *cobra.Command) *cobra.Command

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

func ViewCommand() *cobra.Command

func ViewInit

func ViewInit() *cobra.Command

Types

This section is empty.

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.

Jump to

Keyboard shortcuts

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