fixed initialism errors in accordance with golang conventions in 7 files. (#24287)
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
4ed3dc81bc
Коммит
2e449413e8
@@ -143,35 +143,35 @@ func (si *SlackImporter) SlackImport(c request.CTX, fileData multipart.File, fil
|
||||
reader := utils.NewLimitedReaderWithError(fileReader, slackImportMaxFileSize)
|
||||
if file.Name == "channels.json" {
|
||||
publicChannels, err = slackParseChannels(reader, model.ChannelTypeOpen)
|
||||
if errors.Is(err, utils.SizeLimitExceeded) {
|
||||
if errors.Is(err, utils.ErrSizeLimitExceeded) {
|
||||
log.WriteString(i18n.T("api.slackimport.slack_import.zip.file_too_large", map[string]any{"Filename": file.Name}))
|
||||
continue
|
||||
}
|
||||
channels = append(channels, publicChannels...)
|
||||
} else if file.Name == "dms.json" {
|
||||
directChannels, err = slackParseChannels(reader, model.ChannelTypeDirect)
|
||||
if errors.Is(err, utils.SizeLimitExceeded) {
|
||||
if errors.Is(err, utils.ErrSizeLimitExceeded) {
|
||||
log.WriteString(i18n.T("api.slackimport.slack_import.zip.file_too_large", map[string]any{"Filename": file.Name}))
|
||||
continue
|
||||
}
|
||||
channels = append(channels, directChannels...)
|
||||
} else if file.Name == "groups.json" {
|
||||
privateChannels, err = slackParseChannels(reader, model.ChannelTypePrivate)
|
||||
if errors.Is(err, utils.SizeLimitExceeded) {
|
||||
if errors.Is(err, utils.ErrSizeLimitExceeded) {
|
||||
log.WriteString(i18n.T("api.slackimport.slack_import.zip.file_too_large", map[string]any{"Filename": file.Name}))
|
||||
continue
|
||||
}
|
||||
channels = append(channels, privateChannels...)
|
||||
} else if file.Name == "mpims.json" {
|
||||
groupChannels, err = slackParseChannels(reader, model.ChannelTypeGroup)
|
||||
if errors.Is(err, utils.SizeLimitExceeded) {
|
||||
if errors.Is(err, utils.ErrSizeLimitExceeded) {
|
||||
log.WriteString(i18n.T("api.slackimport.slack_import.zip.file_too_large", map[string]any{"Filename": file.Name}))
|
||||
continue
|
||||
}
|
||||
channels = append(channels, groupChannels...)
|
||||
} else if file.Name == "users.json" {
|
||||
users, err = slackParseUsers(reader)
|
||||
if errors.Is(err, utils.SizeLimitExceeded) {
|
||||
if errors.Is(err, utils.ErrSizeLimitExceeded) {
|
||||
log.WriteString(i18n.T("api.slackimport.slack_import.zip.file_too_large", map[string]any{"Filename": file.Name}))
|
||||
continue
|
||||
}
|
||||
@@ -179,7 +179,7 @@ func (si *SlackImporter) SlackImport(c request.CTX, fileData multipart.File, fil
|
||||
spl := strings.Split(file.Name, "/")
|
||||
if len(spl) == 2 && strings.HasSuffix(spl[1], ".json") {
|
||||
newposts, err := slackParsePosts(reader)
|
||||
if errors.Is(err, utils.SizeLimitExceeded) {
|
||||
if errors.Is(err, utils.ErrSizeLimitExceeded) {
|
||||
log.WriteString(i18n.T("api.slackimport.slack_import.zip.file_too_large", map[string]any{"Filename": file.Name}))
|
||||
continue
|
||||
}
|
||||
|
||||
Ссылка в новой задаче
Block a user