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

@ -51,7 +51,7 @@ func UploadPDF(c *b.Config, s *b.CookieStore) http.HandlerFunc {
}
filename := fmt.Sprint(uuid.New(), ".pdf")
absFilepath, err := filepath.Abs(fmt.Sprint(c.PDFDir, "/", filename))
absFilepath, err := filepath.Abs(c.PDFDir + "/" + filename)
if err != nil {
log.Println(err)
http.Error(w, err.Error(), http.StatusInternalServerError)