mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-01-03 23:38:49 +01:00
♻️ Refactor Go to err != nil, err == nil (#12385)
This commit is contained in:
parent
473a159ef2
commit
b100721fee
147 changed files with 1661 additions and 1659 deletions
|
|
@ -132,7 +132,7 @@ func findReplace(c *gin.Context) {
|
|||
}
|
||||
|
||||
err := model.FindReplace(k, r, replaceTypes, ids, paths, boxes, types, method, orderBy, groupBy)
|
||||
if nil != err {
|
||||
if err != nil {
|
||||
ret.Code = 1
|
||||
ret.Msg = err.Error()
|
||||
ret.Data = map[string]interface{}{"closeTimeout": 5000}
|
||||
|
|
@ -211,7 +211,7 @@ func removeTemplate(c *gin.Context) {
|
|||
|
||||
path := arg["path"].(string)
|
||||
err := model.RemoveTemplate(path)
|
||||
if nil != err {
|
||||
if err != nil {
|
||||
ret.Code = -1
|
||||
ret.Msg = err.Error()
|
||||
return
|
||||
|
|
@ -281,7 +281,7 @@ func updateEmbedBlock(c *gin.Context) {
|
|||
content := arg["content"].(string)
|
||||
|
||||
err := model.UpdateEmbedBlock(id, content)
|
||||
if nil != err {
|
||||
if err != nil {
|
||||
ret.Code = -1
|
||||
ret.Msg = err.Error()
|
||||
return
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue