Defer closing of files (#17213)

Signed-off-by: CodeLingo Bot <bot@codelingo.io>
This commit is contained in:
CodeLingo Bot
2019-05-22 08:48:47 +02:00
committed by Carl Bergquist
parent 9cdf0f4f9c
commit 3ff3e0f2ac
4 changed files with 5 additions and 1 deletions
+1
View File
@@ -316,6 +316,7 @@ func GetHomeDashboard(c *m.ReqContext) Response {
if err != nil {
return Error(500, "Failed to load home dashboard", err)
}
defer file.Close()
dash := dtos.DashboardFullWithMeta{}
dash.Meta.IsHome = true