Documentation
¶
Index ¶
Constants ¶
View Source
const MAJOR_VERSION = 0
View Source
const MINOR_VERSION = 2
View Source
const PATCH_VERSION = 0
View Source
const PRERELEASE_ID = ""
Variables ¶
This section is empty.
Functions ¶
func MakeVersionString ¶ added in v0.2.0
func MakeVersionString() string
Types ¶
type ArgParser ¶
type ArgParser interface { // Add a command AddCommand(name string) Operation // Add an operation AddOperation(short rune, long string) Operation // Parse the arguments Parse(args []string) error }
Argument parser interface
func NewArgParser ¶
func NewArgParser() ArgParser
type Operation ¶
type Operation interface { // Add a boolean switch AddBooleanSwitch(short rune, long string) Operation // Add a boolean switch with only a long name AddLongBooleanSwitch(long string) Operation // Add an increment switch AddIncrementSwitch(short rune, long string) Operation // Add an increment switch with only a long name AddLongIncrementSwitch(long string) Operation // Add an data switch AddDataSwitch(short rune, long string) Operation // Add an data switch with only a long name AddLongDataSwitch(long string) Operation // Set the executor // // NOTE: There may be only one executor. // If you set the executor multiple times, only the latest update will be preserved. SetExecutor(e func(op Operation, args []string) error) Operation // Complete the configuration and go back to its parent Complete() ArgParser // Get regular boolean switches BooleanSwitches() map[string]bool // Get increment switches IncrementSwitches() map[string]uint // Get data switches DataSwitches() map[string]string // Get data that do not belong to any data switches Data() []string }
Click to show internal directories.
Click to hide internal directories.