Exemplo n.º 1
0
// Int representation of the value (will be 0, if not given or not parsable)
func (this *parameter) Int() int {
	if this.Values == nil {
		return 0
	} else {
		return reflekt.AsInt(this.Values[0])
	}
}
Exemplo n.º 2
0
// Ints returns values as int array (values will be 0, if not parsable to int)
func (this *parameter) Ints() []int {
	if this.Values == nil {
		return nil
	} else {
		res := make([]int, this.Count())
		for i, v := range this.Values {
			res[i] = reflekt.AsInt(v)
		}
		return res
	}
}