dcsunny %!s(int64=3) %!d(string=hai) anos
pai
achega
766410a092
Modificáronse 1 ficheiros con 18 adicións e 0 borrados
  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)
+}