From bd34f03ebb1ec4ceab8e9e134791bbc5e2add28b Mon Sep 17 00:00:00 2001 From: mazrean Date: Tue, 24 Oct 2023 14:24:28 +0900 Subject: [PATCH] =?UTF-8?q?responseWriter=E3=81=AEtypo=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- http/http.go | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/http/http.go b/http/http.go index 91f8bb3..dae37ca 100644 --- a/http/http.go +++ b/http/http.go @@ -88,10 +88,10 @@ func listen(addr string) (net.Listener, error) { type responseWriterWithMetrics struct { http.ResponseWriter - reponseWriterMetrics + responseWriterMetrics } -type reponseWriterMetrics struct { +type responseWriterMetrics struct { statusCode int resSize float64 } @@ -99,7 +99,7 @@ type reponseWriterMetrics struct { func newResponseWriterWithMetrics(w http.ResponseWriter) *responseWriterWithMetrics { return &responseWriterWithMetrics{ ResponseWriter: w, - reponseWriterMetrics: reponseWriterMetrics{ + responseWriterMetrics: responseWriterMetrics{ statusCode: -1, resSize: 0, }, @@ -141,10 +141,10 @@ func StdMetricsMiddleware(next http.Handler) http.Handler { return } - var metrics *reponseWriterMetrics + var metrics *responseWriterMetrics wrappedRes := isuhttpgen.ResponseWriterWrapper(res, func(w http.ResponseWriter) isuhttpgen.ResponseWriter { rw := newResponseWriterWithMetrics(w) - metrics = &rw.reponseWriterMetrics + metrics = &rw.responseWriterMetrics return rw })