Bump Go version to 1.23.6 (#30242)
* Bump Go version to 1.23.6 * Update CodeQL Github action as well * Use server's Go version for CodeQL action Co-authored-by: Antonis Stamatiou <stamatiou.antonis@gmail.com> * Empty commit to trigger CI * Bump golangci-lint to a version supporting Go 1.23 * Fix golangci-lint warnings Several rules from gosimple, revive and staticcheck linters were failing: - Redefinition of built-in identifiers (max, min, new, recover...) - Use of printf-like functions with simple strings - Check for nil slices, when len already takes it into account --------- Co-authored-by: Antonis Stamatiou <stamatiou.antonis@gmail.com> Co-authored-by: Mattermost Build <build@mattermost.com>
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
77ae2e2d6d
Коммит
acbbd4c58d
@@ -1,8 +1,8 @@
|
||||
module github.com/mattermost/mattermost/server/public
|
||||
|
||||
go 1.22.0
|
||||
go 1.23.0
|
||||
|
||||
toolchain go1.22.6
|
||||
toolchain go1.23.6
|
||||
|
||||
require (
|
||||
github.com/blang/semver/v4 v4.0.0
|
||||
|
||||
@@ -774,7 +774,7 @@ func (c *Client4) DoAPIRequestReader(ctx context.Context, method, url string, da
|
||||
rq.Header.Set(HeaderAuth, c.AuthType+" "+c.AuthToken)
|
||||
}
|
||||
|
||||
if c.HTTPHeader != nil && len(c.HTTPHeader) > 0 {
|
||||
if len(c.HTTPHeader) > 0 {
|
||||
for k, v := range c.HTTPHeader {
|
||||
rq.Header.Set(k, v)
|
||||
}
|
||||
|
||||
@@ -486,7 +486,7 @@ func (u *User) PreSave() *AppError {
|
||||
u.Props = make(map[string]string)
|
||||
}
|
||||
|
||||
if u.NotifyProps == nil || len(u.NotifyProps) == 0 {
|
||||
if len(u.NotifyProps) == 0 {
|
||||
u.SetDefaultNotifications()
|
||||
}
|
||||
|
||||
@@ -536,7 +536,7 @@ func (u *User) PreUpdate() {
|
||||
u.AuthData = nil
|
||||
}
|
||||
|
||||
if u.NotifyProps == nil || len(u.NotifyProps) == 0 {
|
||||
if len(u.NotifyProps) == 0 {
|
||||
u.SetDefaultNotifications()
|
||||
} else if _, ok := u.NotifyProps[MentionKeysNotifyProp]; ok {
|
||||
// Remove any blank mention keys
|
||||
|
||||
@@ -147,8 +147,8 @@ func init() {
|
||||
seen := make(map[string]string)
|
||||
|
||||
for _, version := range versions {
|
||||
maj, min, _ := SplitVersion(version)
|
||||
verStr := fmt.Sprintf("%v.%v.0", maj, min)
|
||||
major, minor, _ := SplitVersion(version)
|
||||
verStr := fmt.Sprintf("%v.%v.0", major, minor)
|
||||
|
||||
if seen[verStr] == "" {
|
||||
versionsWithoutHotFixes = append(versionsWithoutHotFixes, verStr)
|
||||
|
||||
@@ -52,7 +52,7 @@ func (l *testLogger) logf(prefix, format string, args ...interface{}) {
|
||||
measure(l.logContext)
|
||||
out += fmt.Sprintf(" -- %+v", l.logContext)
|
||||
}
|
||||
l.TB.Logf(out)
|
||||
l.TB.Log(out)
|
||||
}
|
||||
|
||||
func (l *testLogger) Debugf(format string, args ...interface{}) { l.logf("DEBUG", format, args...) }
|
||||
|
||||
Ссылка в новой задаче
Block a user