Documentation ¶
Index ¶
- Variables
- func ArgumentError(msg string)
- func Assert(cond bool)
- func AssertMsg(cond bool, msg string, args ...interface{})
- func AssertionError(msg string, args ...interface{})
- func AttributeError(msg string, args ...interface{})
- func IndexError(msg string, args ...interface{})
- func IntMax(x int, y int) int
- func IntMin(x int, y int) int
- func IntsCopy(a []int) []int
- func IntsEq(a []int, b []int) bool
- func IntsExtend(a []int, n int, v int) []int
- func IntsFill(a []int, v int)
- func IntsFind(a []int, v int) int
- func IntsMax(a []int) int
- func IntsMin(a []int) int
- func IntsProd(a []int) int
- func IntsReverse(a []int) []int
- func InvalidArgument(name string)
- func MissingArgument(name string)
- func NotImplementedError()
- func ResolveFloat(value float64, defval float64) float64
- func ResolveInt(value int, defval int) int
- func RuntimeError(msg string, args ...interface{})
- func ToFloatList(v interface{}) []float64
- func ToIntList(v interface{}) []int
- func TypeError(msg string, args ...interface{})
- func ValueError(msg string, args ...interface{})
- type AnyArg
- type ArgDef
- type ArgDefBase
- type ArgMap
- type Args
- type BoolArg
- type Dtype
- type EnumArg
- type EnumDef
- type FloatArg
- type FloatListArg
- type Half
- type IntArg
- type IntListArg
- type Object
- type ObjectBase
- type StringArg
Constants ¶
This section is empty.
Variables ¶
View Source
var ( IntNone = -int(^uint(0)>>1) - 1 FloatNone = -math.MaxFloat64 )
View Source
var ArgsNone = Args{}
Functions ¶
func ArgumentError ¶
func ArgumentError(msg string)
func AssertionError ¶
func AssertionError(msg string, args ...interface{})
func AttributeError ¶
func AttributeError(msg string, args ...interface{})
func IndexError ¶
func IndexError(msg string, args ...interface{})
func IntsReverse ¶
func InvalidArgument ¶
func InvalidArgument(name string)
func MissingArgument ¶
func MissingArgument(name string)
func NotImplementedError ¶
func NotImplementedError()
func ResolveFloat ¶
func ResolveInt ¶
func RuntimeError ¶
func RuntimeError(msg string, args ...interface{})
func ToFloatList ¶
func ToFloatList(v interface{}) []float64
func ValueError ¶
func ValueError(msg string, args ...interface{})
Types ¶
type AnyArg ¶
type AnyArg struct {
ArgDefBase
}
func NewAnyArgOpt ¶
func NewAnyArgOpt(defval interface{}) *AnyArg
type ArgDefBase ¶
type ArgDefBase struct {
// contains filtered or unexported fields
}
func (*ArgDefBase) Default ¶
func (a *ArgDefBase) Default() interface{}
func (*ArgDefBase) Init ¶
func (a *ArgDefBase) Init(required bool, defval interface{})
func (*ArgDefBase) Required ¶
func (a *ArgDefBase) Required() bool
type BoolArg ¶
type BoolArg struct {
ArgDefBase
}
func NewBoolArg ¶
func NewBoolArg() *BoolArg
func NewBoolArgOpt ¶
type EnumArg ¶
type EnumArg struct { ArgDefBase // contains filtered or unexported fields }
func NewEnumArg ¶
func NewEnumArgOpt ¶
type FloatArg ¶
type FloatArg struct {
ArgDefBase
}
func NewFloatArg ¶
func NewFloatArg() *FloatArg
func NewFloatArgOpt ¶
type FloatListArg ¶
type FloatListArg struct {
ArgDefBase
}
func NewFloatListArg ¶
func NewFloatListArg() *FloatListArg
func NewFloatListArgOpt ¶
func NewFloatListArgOpt(defval []float64) *FloatListArg
func (*FloatListArg) Expand ¶
func (a *FloatListArg) Expand(v interface{}) (interface{}, bool)
type IntListArg ¶
type IntListArg struct {
ArgDefBase
}
func NewIntListArg ¶
func NewIntListArg() *IntListArg
func NewIntListArgOpt ¶
func NewIntListArgOpt(defval []int) *IntListArg
func (*IntListArg) Expand ¶
func (a *IntListArg) Expand(v interface{}) (interface{}, bool)
type ObjectBase ¶
type ObjectBase struct {
// contains filtered or unexported fields
}
func (*ObjectBase) Init ¶
func (o *ObjectBase) Init(self Object, args Args)
func (*ObjectBase) Name ¶
func (o *ObjectBase) Name() string
func (*ObjectBase) Self ¶
func (o *ObjectBase) Self() Object
func (*ObjectBase) ShortClassName ¶
func (o *ObjectBase) ShortClassName() string
type StringArg ¶
type StringArg struct {
ArgDefBase
}
func NewStringArg ¶
func NewStringArg() *StringArg
func NewStringArgOpt ¶
Click to show internal directories.
Click to hide internal directories.