summaryrefslogtreecommitdiffstats
path: root/models/user.go
diff options
context:
space:
mode:
author6543 <6543@obermui.de>2020-10-01 07:54:34 +0200
committerGitHub <noreply@github.com>2020-10-01 06:54:34 +0100
commit818d921bbb665ab966149523b02e8590efc9d9b4 (patch)
tree09d064bf150b25925249da9d6fa8ae6fd066c054 /models/user.go
parent551473b29486489a0cd0d88a86de54db1c44c122 (diff)
downloadgitea-818d921bbb665ab966149523b02e8590efc9d9b4.tar.gz
gitea-818d921bbb665ab966149523b02e8590efc9d9b4.zip
Refactor use TrimSuffix instead of TrimRight (#12993)
* Refactor use TrimSuffix instead of TrimRight * TrimRight right * has #12990
Diffstat (limited to 'models/user.go')
-rw-r--r--models/user.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/models/user.go b/models/user.go
index 650d5a803a..63ce6ffdfc 100644
--- a/models/user.go
+++ b/models/user.go
@@ -397,7 +397,7 @@ func (u *User) generateRandomAvatar(e Engine) error {
// the local explore page. Function returns immediately.
// When applicable, the link is for an avatar of the indicated size (in pixels).
func (u *User) SizedRelAvatarLink(size int) string {
- return strings.TrimRight(setting.AppSubURL, "/") + "/user/avatar/" + u.Name + "/" + strconv.Itoa(size)
+ return strings.TrimSuffix(setting.AppSubURL, "/") + "/user/avatar/" + u.Name + "/" + strconv.Itoa(size)
}
// RealSizedAvatarLink returns a link to the user's avatar. When