Documentation
¶
Overview ¶
Package cmd handles the terminal interface, user flags and arguments.
Index ¶
- Variables
- func Execute() error
- func InfoCommand() *cobra.Command
- func InfoInit() *cobra.Command
- func Init()
- func ListCodepages() *cobra.Command
- func ListCommand() *cobra.Command
- func ListExamples() *cobra.Command
- func ListInit() *cobra.Command
- func ListTable() *cobra.Command
- func ListTables() *cobra.Command
- func Tester(c *cobra.Command) *cobra.Command
- func ViewCommand() *cobra.Command
- func ViewInit() *cobra.Command
- type Lists
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrHide = errors.New("could not hide the flag") ErrUsage = errors.New("command usage could not display") )
View Source
var Cmd = &cobra.Command{ Use: meta.Bin, Short: fmt.Sprintf("Use %s to print plain, BBS era and ANSI textfiles", meta.Name), Long: meta.Name + " takes legacy codepage and ANSI encoded textfiles and\n" + "prints them to a modern Unicode terminal.", Example: fmt.Sprint(example.Cmd), RunE: func(cmd *cobra.Command, args []string) error { return flag.Help(cmd) }, }
Cmd represents the base command when called without any subcommands.
Functions ¶
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 ListCodepages ¶
func ListCommand ¶
func ListExamples ¶
func ListTables ¶
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 ¶
Directories
¶
Path | Synopsis |
---|---|
internal
|
|
flag
Package flag provides the command flags handlers.
|
Package flag provides the command flags handlers. |
format
Package format handles data outputs.
|
Package format handles data outputs. |
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. |
pkg
|
|
example
Package example provides help usage examples for the cmd package.
|
Package example provides help usage examples for the cmd package. |
list
Package list provides the list command run function.
|
Package list provides the list command run function. |
update
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. |
version
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.