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
@@ -50,16 +50,16 @@ func (api *PluginAPI) LoadPluginConfiguration(dest interface{}) error {
|
||||
finalConfig[strings.ToLower(setting)] = value
|
||||
}
|
||||
|
||||
if pluginSettingsJsonBytes, err := json.Marshal(finalConfig); err != nil {
|
||||
pluginSettingsJsonBytes, err := json.Marshal(finalConfig)
|
||||
if err != nil {
|
||||
api.logger.Error("Error marshaling config for plugin", mlog.Err(err))
|
||||
return nil
|
||||
} else {
|
||||
err := json.Unmarshal(pluginSettingsJsonBytes, dest)
|
||||
if err != nil {
|
||||
api.logger.Error("Error unmarshaling config for plugin", mlog.Err(err))
|
||||
}
|
||||
return nil
|
||||
}
|
||||
err = json.Unmarshal(pluginSettingsJsonBytes, dest)
|
||||
if err != nil {
|
||||
api.logger.Error("Error unmarshaling config for plugin", mlog.Err(err))
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (api *PluginAPI) RegisterCommand(command *model.Command) error {
|
||||
|
||||
Ссылка в новой задаче
Block a user