Browse Source

添加base

dcsunny 3 năm trước cách đây
mục cha
commit
766410a092
1 tập tin đã thay đổi với 18 bổ sung0 xóa
  1. 18 0
      errors/base.go

+ 18 - 0
errors/base.go

@@ -0,0 +1,18 @@
+package errors
+
+import (
+	"git.ikuban.com/server/kratos-utils/codes"
+)
+
+var (
+	ErrorParams        = codes.Error(1000, "参数错误")
+	ErrorBasicApiIsNil = codes.Error(1400, "获取api失败")
+)
+
+func ErrorParam(msg string) error {
+	return codes.Error(11000, msg)
+}
+
+func ErrorSystemByMsg(msg string) error {
+	return codes.Error(10500, msg)
+}