list/list.go
func (l *List) Items() ([]interface{}, int) {
	var result []interface{}
	max := len(l.scope)
	end := l.start + l.size

	if end > max {
		end = max
	}

	active := NotFound

	for i, j := l.start, 0; i < end; i, j = i+1, j+1 {
		if l.cursor == i {
			active = j
		}

		result = append(result, *l.scope[i])
	}

	return result, active
}
func (l *List) Items() ([]interface{}, int) {
	var result []interface{}
	max := len(l.scope)
	end := l.start + l.size

	if end > max {
		end = max
	}

	active := NotFound

	for i, j := l.start, 0; i < end; i, j = i+1, j+1 {
		if l.cursor == i {
			active = j
		}

		result = append(result, *l.scope[i])
	}

	return result, active
}
func ( l * List ) Items ( ) ( [ ] interface { } , int ) { var result [ ] interface { } max := len ( l . scope ) end := l . start + l . size if end > max { end = max } active := NotFound for i , j := l . start , 0 ; i < end ; i , j = i + 1 , j + 1 { if l . cursor == i { active = j } result = append ( result , * l . scope [ i ] ) } return result , active }
// Items returns a slice equal to the size of the list with the current visible
// items and the index of the active item in this list.
Items returns a slice equal to the size of the list with the current visible items and the index of the active item in this list .