gitee.com/quant1x/engine@v1.8.4/utils/paging.go (about)

     1  package utils
     2  
     3  // GetPages 计算页数
     4  func GetPages(pageSize, count int) (pages int) {
     5  	//pages = int(math.Ceil(float64(raw.Data.TotalHits) / float64(EastmoneyNoticesPageSize)))
     6  	pages = count / pageSize
     7  	n := count % pageSize
     8  	if n > 0 {
     9  		pages++
    10  	}
    11  	return pages
    12  }