Applies perfsprint linter (#24999)
Replacing usages of fmt.Sprint with faster alternatives Signed-off-by: Philippe Antoine <contact@catenacyber.fr>
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
43f4734eae
Коммит
04e7b6bc9e
@@ -5,6 +5,7 @@ package platform
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"strconv"
|
||||
"time"
|
||||
|
||||
"github.com/mattermost/mattermost/server/public/model"
|
||||
@@ -229,7 +230,7 @@ func (ps *PlatformService) UpdateSessionsIsGuest(c request.CTX, userID string, i
|
||||
}
|
||||
|
||||
for _, session := range sessions {
|
||||
session.AddProp(model.SessionPropIsGuest, fmt.Sprintf("%t", isGuest))
|
||||
session.AddProp(model.SessionPropIsGuest, strconv.FormatBool(isGuest))
|
||||
err := ps.Store.Session().UpdateProps(session)
|
||||
if err != nil {
|
||||
mlog.Warn("Unable to update isGuest session", mlog.Err(err))
|
||||
|
||||
Ссылка в новой задаче
Block a user