Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var NoMatch = &NoMatchErr{}
Functions ¶
func IntToInt ¶
func IntToInt(arg interface{}, vals []interface{}) (err error)
Codec to convert between any builtin int types. Throws bounds and sign errors as appropriate.
func RadStrToInt ¶
func RadStrToInt(arg interface{}, vals []interface{}) error
Codec to convert radix notations like hex, octal, binary to int. Throws bounds and sign errors as appropriate.
Types ¶
type ArgCountErr ¶
type ArgCountErr struct {
// contains filtered or unexported fields
}
func (ArgCountErr) Error ¶
func (e ArgCountErr) Error() string
type Argjoy ¶
type Argjoy struct { Codecs []CodecFunc // Determines whether unpassed arguments are optional. // If this is false, invoking Call() with insufficient number of arguments // will return ArgCountErr Optional bool }
func (*Argjoy) Call ¶
Call fn(vals...), using registered codecs to convert argument types. Returns []interface{} of target function's return values. Will return an error value if any codec fails. Panics if fn is not a valid function.
func (*Argjoy) Convert ¶
func (a *Argjoy) Convert(in []reflect.Type, variadic bool, vals ...interface{}) ([]reflect.Value, error)
Given the arguments to a function as per reflect.In(), produce a list of arguments suitable for invoking reflect.Call(fn, args). If fn is variadic, you must instead use reflect.CallSlice(fn, args).
type NoMatchErr ¶
type NoMatchErr struct {
// contains filtered or unexported fields
}
func (NoMatchErr) Error ¶
func (e NoMatchErr) Error() string
Click to show internal directories.
Click to hide internal directories.