diff options
author | Unknown <joe2010xtmf@163.com> | 2014-04-04 18:31:09 -0400 |
---|---|---|
committer | Unknown <joe2010xtmf@163.com> | 2014-04-04 18:31:09 -0400 |
commit | eb803ec5eb3a7e66a107873ce6ee584b8c77b131 (patch) | |
tree | 7980b8e04af31123708cf8baa9304fc7df596b3c /models/models.go | |
parent | ca5dcea7d15d3564425afbcb65dbea6ab859526f (diff) | |
download | gitea-eb803ec5eb3a7e66a107873ce6ee584b8c77b131.tar.gz gitea-eb803ec5eb3a7e66a107873ce6ee584b8c77b131.zip |
Add transfer repository
Diffstat (limited to 'models/models.go')
-rw-r--r-- | models/models.go | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/models/models.go b/models/models.go index 384f1fc425..0ad863371c 100644 --- a/models/models.go +++ b/models/models.go @@ -53,10 +53,10 @@ func NewTestEngine(x *xorm.Engine) (err error) { // os.MkdirAll(path.Dir(DbCfg.Path), os.ModePerm) // x, err = xorm.NewEngine("sqlite3", DbCfg.Path) default: - return fmt.Errorf("Unknown database type: %s\n", DbCfg.Type) + return fmt.Errorf("Unknown database type: %s", DbCfg.Type) } if err != nil { - return fmt.Errorf("models.init(fail to conntect database): %v\n", err) + return fmt.Errorf("models.init(fail to conntect database): %v", err) } return x.Sync(new(User), new(PublicKey), new(Repository), new(Watch), @@ -75,10 +75,10 @@ func SetEngine() (err error) { os.MkdirAll(path.Dir(DbCfg.Path), os.ModePerm) orm, err = xorm.NewEngine("sqlite3", DbCfg.Path) default: - return fmt.Errorf("Unknown database type: %s\n", DbCfg.Type) + return fmt.Errorf("Unknown database type: %s", DbCfg.Type) } if err != nil { - return fmt.Errorf("models.init(fail to conntect database): %v\n", err) + return fmt.Errorf("models.init(fail to conntect database): %v", err) } // WARNNING: for serv command, MUST remove the output to os.stdout, @@ -89,7 +89,7 @@ func SetEngine() (err error) { f, err := os.Create(logPath) if err != nil { - return fmt.Errorf("models.init(fail to create xorm.log): %v\n", err) + return fmt.Errorf("models.init(fail to create xorm.log): %v", err) } orm.Logger = f @@ -104,7 +104,7 @@ func NewEngine() (err error) { return err } else if err = orm.Sync(new(User), new(PublicKey), new(Repository), new(Watch), new(Action), new(Access), new(Issue), new(Comment)); err != nil { - return fmt.Errorf("sync database struct error: %v\n", err) + return fmt.Errorf("sync database struct error: %v", err) } return nil } |