From 595fb4012f9ea49a18e2006ea9224af5bb98ded4 Mon Sep 17 00:00:00 2001 From: zandwang <80032752+zandwang@users.noreply.github.com> Date: Fri, 1 Aug 2025 06:44:17 +0800 Subject: [PATCH] style: fix formatting in error message and log string (#421) --- backend/api/middleware/log.go | 2 +- backend/types/errno/plugin.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/backend/api/middleware/log.go b/backend/api/middleware/log.go index d1085eee..7a23f783 100644 --- a/backend/api/middleware/log.go +++ b/backend/api/middleware/log.go @@ -50,7 +50,7 @@ func AccessLogMW() app.HandlerFunc { } requestType := ctx.GetInt32(RequestAuthTypeStr) - baseLog := fmt.Sprintf("| %s | %s | %d | %v | %s | %s | %v | %s | %d | %s", + baseLog := fmt.Sprintf("| %s | %s | %d | %v | %s | %s | %v | %s | %d | %s", string(ctx.GetRequest().Scheme()), ctx.Host(), status, latency, clientIP, method, path, handleName, requestType, i18n.GetLocale(c)) diff --git a/backend/types/errno/plugin.go b/backend/types/errno/plugin.go index f9edb70b..ddaa05cd 100644 --- a/backend/types/errno/plugin.go +++ b/backend/types/errno/plugin.go @@ -90,7 +90,7 @@ func init() { code.Register( ErrPluginRecordNotFound, - fmt.Sprintf("record not found"), + "record not found", code.WithAffectStability(false), )