mirror of
https://github.com/mattermost/mattermost.git
synced 2025-02-25 18:55:24 -06:00
Run ineffassign against codebase (#12925)
This commit is contained in:
committed by
Daniel Schalla
parent
4cc2973483
commit
38c0bde7f8
@@ -1346,7 +1346,6 @@ func (s *SqlPostStore) GetOldest() (*model.Post, *model.AppError) {
|
||||
}
|
||||
|
||||
func (s *SqlPostStore) determineMaxPostSize() int {
|
||||
var maxPostSize int = model.POST_MESSAGE_MAX_RUNES_V1
|
||||
var maxPostSizeBytes int32
|
||||
|
||||
if s.DriverName() == model.DATABASE_DRIVER_POSTGRES {
|
||||
@@ -1384,7 +1383,7 @@ func (s *SqlPostStore) determineMaxPostSize() int {
|
||||
}
|
||||
|
||||
// Assume a worst-case representation of four bytes per rune.
|
||||
maxPostSize = int(maxPostSizeBytes) / 4
|
||||
maxPostSize := int(maxPostSizeBytes) / 4
|
||||
|
||||
// To maintain backwards compatibility, don't yield a maximum post
|
||||
// size smaller than the previous limit, even though it wasn't
|
||||
|
||||
@@ -699,7 +699,7 @@ func (ss *SqlSupplier) AlterColumnDefaultIfExists(tableName string, columnName s
|
||||
return false
|
||||
}
|
||||
|
||||
var defaultValue = ""
|
||||
var defaultValue string
|
||||
if ss.DriverName() == model.DATABASE_DRIVER_MYSQL {
|
||||
// Some column types in MySQL cannot have defaults, so don't try to configure anything.
|
||||
if mySqlColDefault == nil {
|
||||
|
||||
@@ -1267,7 +1267,7 @@ func generateSearchQuery(query sq.SelectBuilder, terms []string, fields []string
|
||||
func (us SqlUserStore) performSearch(query sq.SelectBuilder, term string, options *model.UserSearchOptions) ([]*model.User, *model.AppError) {
|
||||
term = sanitizeSearchTerm(term, "*")
|
||||
|
||||
searchType := USER_SEARCH_TYPE_NAMES_NO_FULL_NAME
|
||||
var searchType []string
|
||||
if options.AllowEmails {
|
||||
if options.AllowFullNames {
|
||||
searchType = USER_SEARCH_TYPE_ALL
|
||||
|
||||
Reference in New Issue
Block a user