Replaced util Min/Max functions with builtin

This commit is contained in:
Philipp Wolfer 2024-04-15 15:47:16 +02:00
parent 357932f9b0
commit bcc7bf3167
No known key found for this signature in database
GPG key ID: 8FDF744D4919943B
5 changed files with 4 additions and 34 deletions

View file

@ -26,7 +26,6 @@ import (
"go.uploadedlobster.com/scotty/internal/config"
"go.uploadedlobster.com/scotty/internal/i18n"
"go.uploadedlobster.com/scotty/internal/models"
"go.uploadedlobster.com/scotty/internal/util"
"golang.org/x/oauth2"
)
@ -106,7 +105,7 @@ out:
// and continue.
if offset >= result.Total {
p.Total = int64(result.Total)
offset = util.Max(result.Total-perPage, 0)
offset = max(result.Total-perPage, 0)
continue
}
@ -175,7 +174,7 @@ out:
if offset >= result.Total {
p.Total = int64(result.Total)
totalCount = result.Total
offset = util.Max(result.Total-perPage, 0)
offset = max(result.Total-perPage, 0)
continue
}