Use Go builtin min/max func

This commit is contained in:
Deluan
2024-02-16 21:48:25 -05:00
parent f7a4387d0e
commit 166eb37787
8 changed files with 18 additions and 74 deletions
+1 -3
View File
@@ -4,8 +4,6 @@ import (
"crypto/md5"
"fmt"
"strings"
"github.com/navidrome/navidrome/utils/number"
)
const baseUrl = "https://www.gravatar.com/avatar"
@@ -19,7 +17,7 @@ func Url(email string, size int) string {
if size < 1 {
size = defaultSize
}
size = number.Min(maxSize, size)
size = min(maxSize, size)
return fmt.Sprintf("%s/%x?s=%d", baseUrl, hash, size)
}