summaryrefslogtreecommitdiffstats
path: root/modules
diff options
context:
space:
mode:
authorThomas Boerger <thomas@webhippie.de>2016-11-25 10:11:44 +0100
committerGitHub <noreply@github.com>2016-11-25 10:11:44 +0100
commit3e6f36347196b7d8a16b096806a7140950545d0c (patch)
tree78b4077a13e91fc6764a8a9ad3020d0477a6c260 /modules
parent2255a9af6a471ca6d993ae8ff4d178b304131477 (diff)
parent3c87c57d969dad4d600e2df73cb4ce1e9dcbd7f4 (diff)
downloadgitea-3e6f36347196b7d8a16b096806a7140950545d0c.tar.gz
gitea-3e6f36347196b7d8a16b096806a7140950545d0c.zip
Merge pull request #256 from lunny/lunny/golint_modules_avatar
Golint fixed for modules/avatar
Diffstat (limited to 'modules')
-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)
}