Replace MinInt/MaxInt with generic versions

This commit is contained in:
Deluan
2022-12-19 00:47:42 -05:00
committed by Deluan Quintão
parent 6f5aaa1ec4
commit e03ccb3166
9 changed files with 82 additions and 74 deletions
+2 -2
View File
@@ -5,7 +5,7 @@ import (
"fmt"
"strings"
"github.com/navidrome/navidrome/utils"
"github.com/navidrome/navidrome/utils/math2"
)
const baseUrl = "https://www.gravatar.com/avatar"
@@ -19,7 +19,7 @@ func Url(email string, size int) string {
if size < 1 {
size = defaultSize
}
size = utils.MinInt(maxSize, size)
size = math2.Min(maxSize, size)
return fmt.Sprintf("%s/%x?s=%d", baseUrl, hash, size)
}