reprogl
1package models2
3import (4"strconv"5
6"xelbot.com/reprogl/container"7"xelbot.com/reprogl/utils/hashid"8)
9
10func AvatarLink(id int, options hashid.Option, size ...int) string {11s := 8012if len(size) > 0 {13s = size[0]14}15
16var postfix string17if s != 80 {18postfix = ".w" + strconv.Itoa(s)19}20
21return container.GetConfig().CDNBaseURL + "/images/avatar/" + hashid.Encode(id, options) + postfix + ".png"22}
23