dcsunny 3 anni fa
parent
commit
766410a092
1 ha cambiato i file con 18 aggiunte e 0 eliminazioni
  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)
+}