This is an automated email from the ASF dual-hosted git repository. kumfo pushed a commit to branch test in repository https://gitbox.apache.org/repos/asf/incubator-answer.git
commit eda39380758e838a6c294d2a52ce1c325ebb2cd3 Author: Sonui <[email protected]> AuthorDate: Wed Aug 7 22:51:23 2024 +0800 perf: remove invalid nil pointer check in Translate function --- plugin/plugin.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugin/plugin.go b/plugin/plugin.go index 61ed0d8f..85286855 100644 --- a/plugin/plugin.go +++ b/plugin/plugin.go @@ -219,7 +219,7 @@ func MakeTranslator(key string) Translator { // Translate translates the key to the current language of the context func (t Translator) Translate(ctx *GinContext) string { - if &t == nil || t.Fn == nil { + if t.Fn == nil { return "" } return t.Fn(ctx)
