style fix for error checking (#1170)

+additional linting
This commit is contained in:
Meisam
2021-07-09 20:16:44 +02:00
committed by GitHub
parent a13e1e75e2
commit 7361578412
22 changed files with 62 additions and 112 deletions

View File

@ -65,8 +65,7 @@ func GetServerConfig(w http.ResponseWriter, r *http.Request) {
}
w.Header().Set("Content-Type", "application/json")
err := json.NewEncoder(w).Encode(response)
if err != nil {
if err := json.NewEncoder(w).Encode(response); err != nil {
log.Errorln(err)
}
}