forked from forgejo/forgejo
Refactor use TrimSuffix instead of TrimRight (#12993)
* Refactor use TrimSuffix instead of TrimRight * TrimRight right * has #12990
This commit is contained in:
parent
551473b294
commit
818d921bbb
3 changed files with 3 additions and 3 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue