MM-57378: Bump up golangci version (#26535)
https://mattermost.atlassian.net/browse/MM-57378 ```release-note NONE ``` Co-authored-by: Mattermost Build <build@mattermost.com>
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
7bae6c57f9
Коммит
9431239b2e
@@ -842,10 +842,9 @@ func (a *App) parseLinkMetadata(requestURL string, body io.Reader, contentType s
|
||||
return og, nil, nil
|
||||
}
|
||||
return nil, nil, nil
|
||||
} else {
|
||||
// Not an image or web page with OpenGraph information
|
||||
return nil, nil, nil
|
||||
}
|
||||
// Not an image or web page with OpenGraph information
|
||||
return nil, nil, nil
|
||||
}
|
||||
|
||||
func parseImages(body io.Reader) (*model.PostImage, error) {
|
||||
|
||||
@@ -103,10 +103,9 @@ func (s SqlChannelMemberHistoryStore) hasDataAtOrBefore(time int64) (bool, error
|
||||
return false, err
|
||||
} else if result.Min.Valid {
|
||||
return result.Min.Int64 <= time, nil
|
||||
} else {
|
||||
// if the result was null, there are no rows in the table, so there is no data from before
|
||||
return false, nil
|
||||
}
|
||||
// if the result was null, there are no rows in the table, so there is no data from before
|
||||
return false, nil
|
||||
}
|
||||
|
||||
func (s SqlChannelMemberHistoryStore) getFromChannelMemberHistoryTable(startTime int64, endTime int64, channelId string) ([]*model.ChannelMemberHistoryResult, error) {
|
||||
|
||||
@@ -172,9 +172,8 @@ func (ps SqlPluginStore) CompareAndSet(kv *model.PluginKeyValue, oldValue []byte
|
||||
return false, nil
|
||||
} else if count == 1 {
|
||||
return true, nil
|
||||
} else {
|
||||
return false, errors.Wrapf(err, "got too many rows when counting PluginKeyValue with pluginId=%s, key=%s, rows=%d", kv.PluginId, kv.Key, count)
|
||||
}
|
||||
return false, errors.Wrapf(err, "got too many rows when counting PluginKeyValue with pluginId=%s, key=%s, rows=%d", kv.PluginId, kv.Key, count)
|
||||
}
|
||||
|
||||
// No rows were affected by the update, where condition was not satisfied,
|
||||
|
||||
@@ -637,10 +637,9 @@ func (ss *SqlStore) DoesTableExist(tableName string) bool {
|
||||
}
|
||||
|
||||
return count > 0
|
||||
} else {
|
||||
mlog.Fatal("Failed to check if column exists because of missing driver")
|
||||
return false
|
||||
}
|
||||
mlog.Fatal("Failed to check if column exists because of missing driver")
|
||||
return false
|
||||
}
|
||||
|
||||
func (ss *SqlStore) DoesColumnExist(tableName string, columnName string) bool {
|
||||
@@ -685,10 +684,9 @@ func (ss *SqlStore) DoesColumnExist(tableName string, columnName string) bool {
|
||||
}
|
||||
|
||||
return count > 0
|
||||
} else {
|
||||
mlog.Fatal("Failed to check if column exists because of missing driver")
|
||||
return false
|
||||
}
|
||||
mlog.Fatal("Failed to check if column exists because of missing driver")
|
||||
return false
|
||||
}
|
||||
|
||||
func (ss *SqlStore) DoesTriggerExist(triggerName string) bool {
|
||||
@@ -725,10 +723,9 @@ func (ss *SqlStore) DoesTriggerExist(triggerName string) bool {
|
||||
}
|
||||
|
||||
return count > 0
|
||||
} else {
|
||||
mlog.Fatal("Failed to check if column exists because of missing driver")
|
||||
return false
|
||||
}
|
||||
mlog.Fatal("Failed to check if column exists because of missing driver")
|
||||
return false
|
||||
}
|
||||
|
||||
func (ss *SqlStore) CreateColumnIfNotExists(tableName string, columnName string, mySqlColType string, postgresColType string, defaultValue string) bool {
|
||||
@@ -750,10 +747,9 @@ func (ss *SqlStore) CreateColumnIfNotExists(tableName string, columnName string,
|
||||
}
|
||||
|
||||
return true
|
||||
} else {
|
||||
mlog.Fatal("Failed to create column because of missing driver")
|
||||
return false
|
||||
}
|
||||
mlog.Fatal("Failed to create column because of missing driver")
|
||||
return false
|
||||
}
|
||||
|
||||
func (ss *SqlStore) RemoveTableIfExists(tableName string) bool {
|
||||
|
||||
@@ -14,12 +14,11 @@ func JoinList(items []string) string {
|
||||
return ""
|
||||
} else if len(items) == 1 {
|
||||
return items[0]
|
||||
} else {
|
||||
return i18n.T(
|
||||
"humanize.list_join",
|
||||
map[string]any{
|
||||
"OtherItems": strings.Join(items[:len(items)-1], ", "),
|
||||
"LastItem": items[len(items)-1],
|
||||
})
|
||||
}
|
||||
return i18n.T(
|
||||
"humanize.list_join",
|
||||
map[string]any{
|
||||
"OtherItems": strings.Join(items[:len(items)-1], ", "),
|
||||
"LastItem": items[len(items)-1],
|
||||
})
|
||||
}
|
||||
|
||||
@@ -343,9 +343,9 @@ func completeOAuth(c *Context, w http.ResponseWriter, r *http.Request) {
|
||||
})
|
||||
utils.RenderMobileAuthComplete(w, redirectURL)
|
||||
return
|
||||
} else { // For web
|
||||
c.App.AttachSessionCookies(c.AppContext, w, r)
|
||||
}
|
||||
// For web
|
||||
c.App.AttachSessionCookies(c.AppContext, w, r)
|
||||
|
||||
desktopToken := ""
|
||||
if val, ok := props["desktop_token"]; ok {
|
||||
|
||||
@@ -661,7 +661,8 @@ func HTTPGet(url string, httpClient *http.Client, authToken string, followRedire
|
||||
}
|
||||
}
|
||||
|
||||
if rp, err := httpClient.Do(rq); err != nil {
|
||||
rp, err := httpClient.Do(rq)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
} else if rp.StatusCode == 304 {
|
||||
return rp, nil
|
||||
@@ -670,9 +671,8 @@ func HTTPGet(url string, httpClient *http.Client, authToken string, followRedire
|
||||
} else if rp.StatusCode >= 300 {
|
||||
defer closeBody(rp)
|
||||
return rp, model.AppErrorFromJSON(rp.Body)
|
||||
} else {
|
||||
return rp, nil
|
||||
}
|
||||
return rp, nil
|
||||
}
|
||||
|
||||
func closeBody(r *http.Response) {
|
||||
|
||||
Ссылка в новой задаче
Block a user