diff options
Diffstat (limited to 'models/models.go')
-rw-r--r-- | models/models.go | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/models/models.go b/models/models.go index 1ce704a9e4..7353c11598 100644 --- a/models/models.go +++ b/models/models.go @@ -205,7 +205,7 @@ func getEngine() (*xorm.Engine, error) { return nil, errors.New("this binary version does not build support for SQLite3") } if err := os.MkdirAll(path.Dir(DbCfg.Path), os.ModePerm); err != nil { - return nil, fmt.Errorf("Fail to create directories: %v", err) + return nil, fmt.Errorf("Failed to create directories: %v", err) } connStr = "file:" + DbCfg.Path + "?cache=shared&mode=rwc" case "tidb": @@ -213,7 +213,7 @@ func getEngine() (*xorm.Engine, error) { return nil, errors.New("this binary version does not build support for TiDB") } if err := os.MkdirAll(path.Dir(DbCfg.Path), os.ModePerm); err != nil { - return nil, fmt.Errorf("Fail to create directories: %v", err) + return nil, fmt.Errorf("Failed to create directories: %v", err) } connStr = "goleveldb://" + DbCfg.Path default: @@ -237,7 +237,7 @@ func NewTestEngine(x *xorm.Engine) (err error) { func SetEngine() (err error) { x, err = getEngine() if err != nil { - return fmt.Errorf("Fail to connect to database: %v", err) + return fmt.Errorf("Failed to connect to database: %v", err) } x.SetMapper(core.GonicMapper{}) @@ -247,12 +247,12 @@ func SetEngine() (err error) { logPath := path.Join(setting.LogRootPath, "xorm.log") if err := os.MkdirAll(path.Dir(logPath), os.ModePerm); err != nil { - return fmt.Errorf("Fail to create dir %s: %v", logPath, err) + return fmt.Errorf("Failed to create dir %s: %v", logPath, err) } f, err := os.Create(logPath) if err != nil { - return fmt.Errorf("Fail to create xorm.log: %v", err) + return fmt.Errorf("Failed to create xorm.log: %v", err) } x.SetLogger(xorm.NewSimpleLogger(f)) x.ShowSQL(true) |