Beispiel #1
0
func (r *GoReport) getTotalPage(lineno int, list *df.List) int {
	count := 0
	page := 0
	for i, l := range list.GetAsArray() {
		if l.(*pagehist).line >= lineno {
			count = i
			break
		}
	}
	for i := count; i < list.Size(); i++ {
		newpage := list.Get(i).(*pagehist).page
		if newpage <= page {
			return page
		}
		page = newpage
		//fmt.Printf("page :%v\n", page)
	}
	return page
}
Beispiel #2
0
func SetNormalFetchResult(ar *df.List) map[string]interface{} {
	return SetFetchResult(ar.GetAsArray(), 0, 0, ar.Size())
}