Handle SetModel error, fixes one errcheck report (#257) (#957)

This commit is contained in:
Lunny Xiao 2017-02-19 10:11:59 +08:00 committed by GitHub
parent 9a5009a2cc
commit 023a6604e2

View File

@ -74,7 +74,9 @@ func runCreateUser(c *cli.Context) error {
setting.NewContext() setting.NewContext()
models.LoadConfigs() models.LoadConfigs()
models.SetEngine() if err := models.SetEngine(); err != nil {
return fmt.Errorf("models.SetEngine: %v", err)
}
if err := models.CreateUser(&models.User{ if err := models.CreateUser(&models.User{
Name: c.String("name"), Name: c.String("name"),