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
@@ -301,7 +301,7 @@ func (th *SearchTestHelper) createDirectChannel(teamID, name, displayName string
|
||||
}
|
||||
|
||||
func (th *SearchTestHelper) createGroupChannel(teamID, displayName string, users []*model.User) (*model.Channel, error) {
|
||||
userIDS := make([]string, len(users))
|
||||
userIDS := make([]string, 0, len(users))
|
||||
for _, user := range users {
|
||||
userIDS = append(userIDS, user.Id)
|
||||
}
|
||||
@@ -464,7 +464,7 @@ func (th *SearchTestHelper) assertUsersMatchInAnyOrder(t *testing.T, expected, a
|
||||
|
||||
func (th *SearchTestHelper) checkPostInSearchResults(t *testing.T, postID string, searchResults map[string]*model.Post) {
|
||||
t.Helper()
|
||||
postIDS := make([]string, len(searchResults))
|
||||
postIDS := make([]string, 0, len(searchResults))
|
||||
for ID := range searchResults {
|
||||
postIDS = append(postIDS, ID)
|
||||
}
|
||||
@@ -473,7 +473,7 @@ func (th *SearchTestHelper) checkPostInSearchResults(t *testing.T, postID string
|
||||
|
||||
func (th *SearchTestHelper) checkFileInfoInSearchResults(t *testing.T, fileID string, searchResults map[string]*model.FileInfo) {
|
||||
t.Helper()
|
||||
fileIDS := make([]string, len(searchResults))
|
||||
fileIDS := make([]string, 0, len(searchResults))
|
||||
for ID := range searchResults {
|
||||
fileIDS = append(fileIDS, ID)
|
||||
}
|
||||
|
||||
Ссылка в новой задаче
Block a user