Only use fmt.Sprint() when necessary

This commit is contained in:
2024-10-04 16:37:19 +02:00
parent 70d403d7d7
commit f28c204c52
5 changed files with 5 additions and 6 deletions

View File

@@ -61,7 +61,7 @@ func PublishLatestIssue(c *b.Config, db *b.DB, s *b.CookieStore) http.HandlerFun
article := &b.Article{
Title: title,
EncURL: fmt.Sprint(c.Domain, "/image/serve/", imgFileName),
EncURL: c.Domain + "/image/serve/" + imgFileName,
EncLength: int(imgInfo.Size()),
EncType: mime.TypeByExtension(filepath.Ext(imgAbsName)),
Published: true,