Failover ees/loggers improved + tests

This commit is contained in:
adi
2022-07-11 17:59:20 +03:00
committed by Dan Christian Bogos
parent 81793af5de
commit bf870b1e2b
35 changed files with 1046 additions and 699 deletions

View File

@@ -987,17 +987,17 @@ func (pgnt Paginator) Clone() Paginator {
// GetPaginateOpts retrieves paginate options from the APIOpts map
func GetPaginateOpts(opts map[string]interface{}) (limit, offset, maxItems int, err error) {
if limitIface, has := opts[PageLimitOpt]; has {
if limit, err = IfaceAsTInt(limitIface); err != nil {
if limit, err = IfaceAsInt(limitIface); err != nil {
return
}
}
if offsetIface, has := opts[PageOffsetOpt]; has {
if offset, err = IfaceAsTInt(offsetIface); err != nil {
if offset, err = IfaceAsInt(offsetIface); err != nil {
return
}
}
if maxItemsIface, has := opts[PageMaxItemsOpt]; has {
if maxItems, err = IfaceAsTInt(maxItemsIface); err != nil {
if maxItems, err = IfaceAsInt(maxItemsIface); err != nil {
return
}
}