1
0
Fork 0
mirror of https://github.com/Luzifer/mondash.git synced 2024-12-22 20:11:18 +00:00

GOLINT: Explicitly ignore errors

This commit is contained in:
Knut Ahlers 2015-02-20 19:47:36 +01:00
parent 2cfd00b245
commit 67eb34ac43
3 changed files with 8 additions and 5 deletions

View file

@ -90,7 +90,7 @@ func main() {
return
}
s3Storage.Del(params["dashid"])
_ = s3Storage.Del(params["dashid"])
http.Error(res, "OK", http.StatusOK)
})
@ -186,10 +186,10 @@ func generateAPIKey() string {
func renderTemplate(templateName string, context pongo2.Context, res http.ResponseWriter) {
if tpl, ok := templates[templateName]; ok {
tpl.ExecuteWriter(context, res)
_ = tpl.ExecuteWriter(context, res)
} else {
res.WriteHeader(http.StatusInternalServerError)
res.Write([]byte(fmt.Sprintf("Template %s not found!", templateName)))
_, _ = res.Write([]byte(fmt.Sprintf("Template %s not found!", templateName)))
}
}

View file

@ -22,7 +22,7 @@ func loadDashboard(dashid string) (*dashboard, error) {
}
tmp := &dashboard{DashboardID: dashid}
json.Unmarshal(data, tmp)
_ = json.Unmarshal(data, tmp)
return tmp, nil
}

View file

@ -45,7 +45,10 @@ func runWelcomePage() {
url := fmt.Sprintf("%s/welcome/beer_available", baseURL)
req, _ := http.NewRequest("PUT", url, bytes.NewBuffer(body))
req.Header.Add("Authorization", welcomeAPIToken)
http.DefaultClient.Do(req)
_, err = http.DefaultClient.Do(req)
if err != nil {
log.Printf("[WelcomeRunner] %s", err)
}
}
}