更新用法

This commit is contained in:
Yun
2024-08-11 22:19:28 +08:00
parent 8d3bd7cade
commit 3a4c3e58e6
4 changed files with 51 additions and 9 deletions
-2
View File
@@ -5,8 +5,6 @@ import (
)
type LangError interface {
NewError(ctx context.Context, key string) error // New错误
NewErrorFormat(ctx context.Context, key string, format map[string]string) error // New错误
Error() string // 实现error接口&获取翻译后的错误信息
GetCode() int // 获取翻译后的Code
GetKey() string // 获取原Key值