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
|
|
@ -30,7 +30,7 @@ func startFreeTrial(c *gin.Context) {
|
|||
defer c.JSON(http.StatusOK, ret)
|
||||
|
||||
err := model.StartFreeTrial()
|
||||
if nil != err {
|
||||
if err != nil {
|
||||
ret.Code = -1
|
||||
ret.Msg = err.Error()
|
||||
return
|
||||
|
|
@ -48,7 +48,7 @@ func useActivationcode(c *gin.Context) {
|
|||
|
||||
code := arg["data"].(string)
|
||||
err := model.UseActivationcode(code)
|
||||
if nil != err {
|
||||
if err != nil {
|
||||
ret.Code = -1
|
||||
ret.Msg = err.Error()
|
||||
return
|
||||
|
|
@ -73,7 +73,7 @@ func deactivateUser(c *gin.Context) {
|
|||
defer c.JSON(http.StatusOK, ret)
|
||||
|
||||
err := model.DeactivateUser()
|
||||
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