diff options
author | Gusted <williamzijl7@hotmail.com> | 2021-12-20 05:41:31 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-12-20 04:41:31 +0000 |
commit | ff2fd08228dd6323ac4a1cbd2f37f8ae15733eab (patch) | |
tree | 9079b869968d358502f64ce03caf4097556c53cd /modules/templates/helper.go | |
parent | 25677cdc5b11f7100ca2e4b0819e02ca62e22ab1 (diff) | |
download | gitea-ff2fd08228dd6323ac4a1cbd2f37f8ae15733eab.tar.gz gitea-ff2fd08228dd6323ac4a1cbd2f37f8ae15733eab.zip |
Simplify parameter types (#18006)
Remove repeated type declarations in function definitions.
Diffstat (limited to 'modules/templates/helper.go')
-rw-r--r-- | modules/templates/helper.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/modules/templates/helper.go b/modules/templates/helper.go index c1c6b40347..a05c0c1a95 100644 --- a/modules/templates/helper.go +++ b/modules/templates/helper.go @@ -524,7 +524,7 @@ func parseOthers(defaultSize int, defaultClass string, others ...interface{}) (i } // AvatarHTML creates the HTML for an avatar -func AvatarHTML(src string, size int, class string, name string) template.HTML { +func AvatarHTML(src string, size int, class, name string) template.HTML { sizeStr := fmt.Sprintf(`%d`, size) if name == "" { @@ -594,7 +594,7 @@ func RepoAvatar(repo *repo_model.Repository, others ...interface{}) template.HTM } // AvatarByEmail renders avatars by email address. args: email, name, size (int), class (string) -func AvatarByEmail(email string, name string, others ...interface{}) template.HTML { +func AvatarByEmail(email, name string, others ...interface{}) template.HTML { size, class := parseOthers(avatars.DefaultAvatarPixelSize, "ui avatar image", others...) src := avatars.GenerateEmailAvatarFastLink(email, size*setting.Avatar.RenderedSizeFactor) |