diff options
Diffstat (limited to 'modules/base/tool.go')
-rw-r--r-- | modules/base/tool.go | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/modules/base/tool.go b/modules/base/tool.go index 10b3fee3..046b2c51 100644 --- a/modules/base/tool.go +++ b/modules/base/tool.go @@ -22,6 +22,11 @@ func EncodeMd5(str string) string { return hex.EncodeToString(m.Sum(nil)) } +// AvatarLink returns avatar link by given e-mail. +func AvatarLink(email string) string { + return "http://1.gravatar.com/avatar/" + EncodeMd5(email) +} + // Seconds-based time units const ( Minute = 60 |