diff options
author | Jesús Espino <jespinog@gmail.com> | 2018-09-24 13:27:31 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-09-24 13:27:31 +0200 |
commit | 9d73c79deff403dd9ac2d1476e1c5fdc282beafc (patch) | |
tree | 75461e60c15769806e6586dc6779dbcf10501ae6 /app/config.go | |
parent | 8898d7aab9565c48162c5cf16bfdf2f6f74cdb1e (diff) | |
download | chat-9d73c79deff403dd9ac2d1476e1c5fdc282beafc.tar.gz chat-9d73c79deff403dd9ac2d1476e1c5fdc282beafc.tar.bz2 chat-9d73c79deff403dd9ac2d1476e1c5fdc282beafc.zip |
Idiomatic error handling for app/c*.go (#9423)
Diffstat (limited to 'app/config.go')
-rw-r--r-- | app/config.go | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/app/config.go b/app/config.go index 1e96fd4fa..a63650a58 100644 --- a/app/config.go +++ b/app/config.go @@ -185,7 +185,9 @@ func (a *App) ensureAsymmetricSigningKey() error { result := <-a.Srv.Store.System().GetByName(model.SYSTEM_ASYMMETRIC_SIGNING_KEY) if result.Err != nil { return result.Err - } else if err := json.Unmarshal([]byte(result.Data.(*model.System).Value), &key); err != nil { + } + + if err := json.Unmarshal([]byte(result.Data.(*model.System).Value), &key); err != nil { return err } } |