summaryrefslogtreecommitdiffstats
path: root/modules/avatar
diff options
context:
space:
mode:
authorLunny Xiao <xiaolunwen@gmail.com>2016-11-25 16:37:04 +0800
committerLunny Xiao <xiaolunwen@gmail.com>2016-11-25 16:37:04 +0800
commit3c87c57d969dad4d600e2df73cb4ce1e9dcbd7f4 (patch)
treea6a060cd43fdfb2fc54f53978628b4e0beb8cd9f /modules/avatar
parent081c2a9395706e24bb396bf2aa9ac8a92d0a8f40 (diff)
downloadgitea-3c87c57d969dad4d600e2df73cb4ce1e9dcbd7f4.tar.gz
gitea-3c87c57d969dad4d600e2df73cb4ce1e9dcbd7f4.zip
golint fixed for modules/avatar
Diffstat (limited to 'modules/avatar')
-rw-r--r--modules/avatar/avatar.go7
1 files changed, 4 insertions, 3 deletions
diff --git a/modules/avatar/avatar.go b/modules/avatar/avatar.go
index a8c3826d15..f426978b32 100644
--- a/modules/avatar/avatar.go
+++ b/modules/avatar/avatar.go
@@ -14,9 +14,10 @@ import (
"github.com/issue9/identicon"
)
-const AVATAR_SIZE = 290
+// AvatarSize returns avatar's size
+const AvatarSize = 290
-// RandomImage generates and returns a random avatar image unique to input data
+// RandomImageSize generates and returns a random avatar image unique to input data
// in custom size (height and width).
func RandomImageSize(size int, data []byte) (image.Image, error) {
randExtent := len(palette.WebSafe) - 32
@@ -39,5 +40,5 @@ func RandomImageSize(size int, data []byte) (image.Image, error) {
// RandomImage generates and returns a random avatar image unique to input data
// in default size (height and width).
func RandomImage(data []byte) (image.Image, error) {
- return RandomImageSize(AVATAR_SIZE, data)
+ return RandomImageSize(AvatarSize, data)
}