Fix linting error
This commit is contained in:
parent
917c3fc7a7
commit
2698bd4fd7
@ -99,7 +99,7 @@ func ParseSingleUser(apiUser APIUser) (ret User, err error) {
|
||||
ret.ProfileImageUrl = apiUser.ProfileImageURLHTTPS
|
||||
|
||||
|
||||
if regexp.MustCompile("_normal\\.\\w{2,4}").MatchString(ret.ProfileImageUrl) {
|
||||
if regexp.MustCompile(`_normal\.\w{2,4}`).MatchString(ret.ProfileImageUrl) {
|
||||
ret.ProfileImageUrl = strings.ReplaceAll(ret.ProfileImageUrl, "_normal.", ".")
|
||||
}
|
||||
ret.BannerImageUrl = apiUser.ProfileBannerURL
|
||||
@ -142,7 +142,7 @@ func (u User) compute_banner_image_local_path() string {
|
||||
base_name := path.Base(u.BannerImageUrl)
|
||||
|
||||
// Check if it has an extension (e.g., ".png" or ".jpeg")
|
||||
if !regexp.MustCompile("\\.\\w{2,4}$").MatchString(base_name) {
|
||||
if !regexp.MustCompile(`\.\w{2,4}$`).MatchString(base_name) {
|
||||
// If it doesn't have an extension, add one
|
||||
base_name += ".jpg"
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user