@@ -4,6 +4,8 @@ import (
"context"
)
// Key生成错误信息
type LangError interface {
Error() string // 实现error接口&获取翻译后的错误信息
GetCode() int // 获取翻译后的Code
@@ -12,6 +14,8 @@ type LangError interface {
SetLang(lang string) // 设置语言
}
type langError struct {
ctx context.Context
key string
The note is not visible to the blocked user.