chore!(all): attempt to update beego to v2

BREAKING CHANGE: beego has update to v2, and this version of mindoc IS
NOT TESTED AND STABLE!!!
This commit is contained in:
roberChen
2021-03-23 21:55:50 +08:00
parent 79f70d830d
commit 90c1329de2
56 changed files with 1021 additions and 766 deletions

View File

@@ -8,8 +8,8 @@ import (
"strings"
"github.com/astaxie/beego"
"github.com/astaxie/beego/orm"
"github.com/astaxie/beego/logs"
"github.com/beego/beego/v2/adapter/orm"
"github.com/mindoc-org/mindoc/conf"
"github.com/mindoc-org/mindoc/utils/filetil"
)
@@ -65,7 +65,7 @@ func (m *Attachment) Delete() error {
if err == nil {
if err1 := os.Remove(m.FilePath); err1 != nil {
beego.Error(err1)
logs.Error(err1)
}
}
@@ -110,7 +110,7 @@ func (m *Attachment) FindToPager(pageIndex, pageSize int) (attachList []*Attachm
if err != nil {
if err == orm.ErrNoRows {
beego.Info("没有查到附件 ->", err)
logs.Info("没有查到附件 ->", err)
err = nil
}
return