Paul 6 anni fa
parent
commit
9b4be70aaf
1 ha cambiato i file con 1 aggiunte e 0 eliminazioni
  1. 1
    0
      middleware/check/check.go

+ 1
- 0
middleware/check/check.go Vedi File

53
 			}
53
 			}
54
 
54
 
55
 			if !ew.successful() {
55
 			if !ew.successful() {
56
+				// 对返回的错误信息格式进行代码检测
56
 				if len(rps) != 1 || rps["msg"] == "" {
57
 				if len(rps) != 1 || rps["msg"] == "" {
57
 					panic(fmt.Sprintf("you need return %s but, %s", `{"msg":"content can't empty'"}`, string(ew.data)))
58
 					panic(fmt.Sprintf("you need return %s but, %s", `{"msg":"content can't empty'"}`, string(ew.data)))
58
 				}
59
 				}