MM-31064: Simplify indentation (#16565)
* MM-31064: Simplify indentation Reduce indentation where possible. ```release-note NONE ``` Command ran to verify: golangci-lint run --disable-all --enable golint --max-issues-per-linter=10000 --max-same-issues=100000 ./... | grep "block ends with a return state" https://mattermost.atlassian.net/browse/MM-31064 * incorporate review comments * enable golint for outdent rule * fix remaining issues Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
7419898449
Коммит
1a131b54af
@@ -435,28 +435,28 @@ func moveChannel(a *app.App, team *model.Team, channel *model.Channel, user *mod
|
||||
auditRec.AddMeta("team", team)
|
||||
a.LogAuditRec(auditRec, nil)
|
||||
|
||||
if incomingWebhooks, err := a.GetIncomingWebhooksForTeamPage(oldTeamId, 0, 10000000); err != nil {
|
||||
incomingWebhooks, err := a.GetIncomingWebhooksForTeamPage(oldTeamId, 0, 10000000)
|
||||
if err != nil {
|
||||
return err
|
||||
} else {
|
||||
for _, webhook := range incomingWebhooks {
|
||||
if webhook.ChannelId == channel.Id {
|
||||
webhook.TeamId = team.Id
|
||||
if _, err := a.Srv().Store.Webhook().UpdateIncoming(webhook); err != nil {
|
||||
CommandPrintErrorln("Failed to move incoming webhook '" + webhook.Id + "' to new team.")
|
||||
}
|
||||
}
|
||||
for _, webhook := range incomingWebhooks {
|
||||
if webhook.ChannelId == channel.Id {
|
||||
webhook.TeamId = team.Id
|
||||
if _, err := a.Srv().Store.Webhook().UpdateIncoming(webhook); err != nil {
|
||||
CommandPrintErrorln("Failed to move incoming webhook '" + webhook.Id + "' to new team.")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if outgoingWebhooks, err := a.GetOutgoingWebhooksForTeamPage(oldTeamId, 0, 10000000); err != nil {
|
||||
outgoingWebhooks, err := a.GetOutgoingWebhooksForTeamPage(oldTeamId, 0, 10000000)
|
||||
if err != nil {
|
||||
return err
|
||||
} else {
|
||||
for _, webhook := range outgoingWebhooks {
|
||||
if webhook.ChannelId == channel.Id {
|
||||
webhook.TeamId = team.Id
|
||||
if _, err := a.Srv().Store.Webhook().UpdateOutgoing(webhook); err != nil {
|
||||
CommandPrintErrorln("Failed to move outgoing webhook '" + webhook.Id + "' to new team.")
|
||||
}
|
||||
}
|
||||
for _, webhook := range outgoingWebhooks {
|
||||
if webhook.ChannelId == channel.Id {
|
||||
webhook.TeamId = team.Id
|
||||
if _, err := a.Srv().Store.Webhook().UpdateOutgoing(webhook); err != nil {
|
||||
CommandPrintErrorln("Failed to move outgoing webhook '" + webhook.Id + "' to new team.")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Ссылка в новой задаче
Block a user