refactor: use url.Values in avatar url
This commit is contained in:
@@ -6,6 +6,7 @@ import (
|
||||
)
|
||||
|
||||
func DefaultAvatarURL(username string) string {
|
||||
seed := url.QueryEscape(strings.TrimSpace(username))
|
||||
return "https://api.dicebear.com/9.x/dylan/svg?seed=" + seed
|
||||
params := url.Values{}
|
||||
params.Set("seed", strings.TrimSpace(username))
|
||||
return "https://api.dicebear.com/9.x/dylan/svg?" + params.Encode()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user