Applies perfsprint linter (#24999)
Replacing usages of fmt.Sprint with faster alternatives Signed-off-by: Philippe Antoine <contact@catenacyber.fr>
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
43f4734eae
Коммит
04e7b6bc9e
@@ -9,6 +9,7 @@ import (
|
||||
"html"
|
||||
"html/template"
|
||||
"io"
|
||||
"strconv"
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
@@ -343,9 +344,9 @@ func getFormattedPostTime(user *model.User, post *model.Post, useMilitaryTime bo
|
||||
|
||||
return formattedPostTime{
|
||||
Time: localTime,
|
||||
Year: fmt.Sprintf("%d", localTime.Year()),
|
||||
Year: strconv.Itoa(localTime.Year()),
|
||||
Month: translateFunc(localTime.Month().String()),
|
||||
Day: fmt.Sprintf("%d", localTime.Day()),
|
||||
Day: strconv.Itoa(localTime.Day()),
|
||||
Hour: hour,
|
||||
Minute: fmt.Sprintf("%02d"+period, localTime.Minute()),
|
||||
TimeZone: zone,
|
||||
|
||||
Ссылка в новой задаче
Block a user