Browse Source

内置基础错误码

jys 2 years ago
parent
commit
96d8aba851
1 changed files with 6 additions and 0 deletions
  1. 6 0
      v2alpha/code.go

+ 6 - 0
v2alpha/code.go

@@ -5,6 +5,12 @@ import (
 	"net/http"
 )
 
+const (
+	ErrBasic = iota + 1
+	ErrDb
+	ErrParam
+)
+
 // ErrCode 产生error所包含的错误码信息
 // 支持http错误码、业务错误码
 // 可通过下方快捷函数快速创建指定http码的错误码