Documentation ¶
Overview ¶
this package defines and initializes custom types that can be used with the Flag package. these types can be called using the flag.Var() function.
Common Types:
- string array: comma-separated list of strings that can be passed in.
- int array: comma-separated list of ints that can be passed in.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type IntArray ¶
type IntArray []int
custom type representing an integer slice. this will be used to consume a comma-separated array.
type StringArray ¶
type StringArray []string
custom type representing a string slice. this will be used to consume a comma-separated array.
func (*StringArray) Set ¶
func (s *StringArray) Set(value string) (err error)
function designed to set the values of the string array object. this will take in a string, process it, and convert it into a string array.
func (*StringArray) String ¶
func (s *StringArray) String() (val string)
function designed to return the string representation of the custom StringArray object. this will process the values in the string array and pass back a single string.