MM-52532: Fix golangci warnings (#23709)
https://mattermost.atlassian.net/browse/MM-52532 - Replace golint with revive - Add makezero linter - Fix all the required linter failures Some issues in enterprise and public modules are yet to be fixed. We send this to expediate things.
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
62a3ee8adc
Коммит
c249ba4a66
@@ -124,7 +124,7 @@ func linearFilterPostList(postList *model.PostList, earliestAccessibleTime int64
|
||||
// this is the slower fallback that is still safe if we can not
|
||||
// assume posts are ordered by CreatedAt
|
||||
func linearFilterPostsSlice(posts []*model.Post, earliestAccessibleTime int64) ([]*model.Post, int64) {
|
||||
var firstInaccessiblePostTime int64 = 0
|
||||
var firstInaccessiblePostTime int64
|
||||
n := 0
|
||||
for i := range posts {
|
||||
if createAt := posts[i].CreateAt; createAt >= earliestAccessibleTime {
|
||||
@@ -243,7 +243,7 @@ func (a *App) getFilteredAccessiblePosts(posts []*model.Post, options filterPost
|
||||
return posts, 0, nil
|
||||
}
|
||||
if bounds.noAccessible() {
|
||||
var firstInaccessiblePostTime int64 = 0
|
||||
var firstInaccessiblePostTime int64
|
||||
if lenPosts > 0 {
|
||||
firstPostCreatedAt := posts[0].CreateAt
|
||||
lastPostCreatedAt := posts[len(posts)-1].CreateAt
|
||||
|
||||
Ссылка в новой задаче
Block a user