package
0.0.0-20221214075839-39ac156e0e0e
Repository: https://github.com/ensn1to/go-pkg.git
Documentation: pkg.go.dev
# Functions
AddFlags.
FormatBaseName generates a executable file name under different os based on basename.
No description provided by the author
NewApp creates a new application instance with applicaiton name, binary name, and initial options.
NewCommand creates a new sub command instance with command name and others options.
PrintSections prints the given names flagsets info in sections.
TerminalSize returns the width and height of the user's process terminal.
WithCommandOptions allows the app to read from the flags from command line.
No description provided by the author
WithDefaultValidArgs default args validation funciton.
No description provided by the author
WithNoConfig not support config flag.
WithOptions reads from command line.
No description provided by the author
No description provided by the author
WithValidArgs validate the non-flag args.
WordSepNormalizeFunc changes all flags that contain "_" separators.
# Structs
App base structure for constructs a cli application.
Command a sub command structure of the cli application.
NamedFlagSets stores named flag sets in the order of calling FlagSet.
# Interfaces
CmdLineOptioner abstracts configuration options for reading parameters from command line.
CompleteableOptions abstracts options which can be completed.
# Type aliases
CommandOption optional parameters for initializing the command.
Option optional parameters for initializing the applicaiton.
RunCommandFunc the app's command startup callback function.
RunCommand the app's startup callback function.