From 023a6604e20ab38d40650cbaac8bdbbbfe817933 Mon Sep 17 00:00:00 2001 From: Lunny Xiao Date: Sun, 19 Feb 2017 10:11:59 +0800 Subject: [PATCH] Handle SetModel error, fixes one errcheck report (#257) (#957) --- cmd/admin.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/cmd/admin.go b/cmd/admin.go index 440a172a8..f4782195e 100644 --- a/cmd/admin.go +++ b/cmd/admin.go @@ -74,7 +74,9 @@ func runCreateUser(c *cli.Context) error { setting.NewContext() models.LoadConfigs() - models.SetEngine() + if err := models.SetEngine(); err != nil { + return fmt.Errorf("models.SetEngine: %v", err) + } if err := models.CreateUser(&models.User{ Name: c.String("name"),