From d9898ed20544e73abc9ce99cbef9fbbf961b35b4 Mon Sep 17 00:00:00 2001 From: guoguangwu Date: Fri, 21 Jul 2023 17:31:11 +0800 Subject: [PATCH] chore: use String() instead of fmt.Sprintf --- framework/rest/gateway.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/framework/rest/gateway.go b/framework/rest/gateway.go index 48746287..88c188d7 100644 --- a/framework/rest/gateway.go +++ b/framework/rest/gateway.go @@ -126,12 +126,12 @@ func Proxy(proxyConfig ProxyConfig) func(inner http.Handler) http.Handler { return func(inner http.Handler) http.Handler { return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { if isWebSocket(r) || r.Header.Get(HeaderAccept) == "text/event-stream" { - http.Error(w, fmt.Sprintf("not support"), http.StatusBadGateway) + http.Error(w, "not support", http.StatusBadGateway) return } parts := strings.Split(r.URL.Path, "/") if len(parts) <= 1 { - http.Error(w, fmt.Sprintf("request url must be prefixed / + service name"), http.StatusBadGateway) + http.Error(w, "request url must be prefixed / + service name", http.StatusBadGateway) return } serviceName := parts[1]