dedup & fix

This commit is contained in:
6543 2023-02-09 21:27:47 +01:00
parent 3c0ee7e8a3
commit a656335a22
7 changed files with 189 additions and 213 deletions

View file

@ -90,7 +90,7 @@ func (x xDB) Compact() (string, error) {
// Items return al certs from db, if pageSize is 0 it does not use limit
func (x xDB) Items(page, pageSize int) ([]*Cert, error) {
// paginated return
if pageSize >= 0 {
if pageSize > 0 {
certs := make([]*Cert, 0, pageSize)
if page >= 0 {
page = 1