Discover Packages
github.com/hoenirvili/skapt
argument
package
Version:
v0.0.0-...-fdaedd9
Opens a new window with list of versions in this module.
Published: Oct 26, 2018
License: MIT
Opens a new window with license information.
Imports: 3
Opens a new window with list of imports.
Imported by: 3
Opens a new window with list of known importers.
Documentation
Documentation
¶
Package argument provides small set of types
to parse and interpret command line arguments
Package argument provides small set of types
to parse and interpret command line arguments
Long return true given the arg is a long one
LongTrim returns the argument without it's long prefix and
his target value if he has one
Short return true given the arg is a short one
ShortTrim returns the argument without it's short prefix
Type defines the type of an argument
const (
Bool Type = iota
Int
String
Float
)
String returns the type in an outputted format
Value can hold any argument of type argument.Type
NewValue takes a command line string argument and his desired type
and returns a new Value that can convert to t Type
Bool returns the value as type bool
Float returns the value as type float64
Int returns the value as type int
Parse parses the value as a given t Type given
if the value is not a valid t Type it will return an error
String returns the value as type string
Source Files
¶
Click to show internal directories.
Click to hide internal directories.