Skip to content

Commit

Permalink
responseWriterのtypo修正
Browse files Browse the repository at this point in the history
  • Loading branch information
mazrean committed Oct 24, 2023
1 parent 7dd06ea commit bd34f03
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions http/http.go
Original file line number Diff line number Diff line change
Expand Up @@ -88,18 +88,18 @@ func listen(addr string) (net.Listener, error) {

type responseWriterWithMetrics struct {
http.ResponseWriter
reponseWriterMetrics
responseWriterMetrics
}

type reponseWriterMetrics struct {
type responseWriterMetrics struct {
statusCode int
resSize float64
}

func newResponseWriterWithMetrics(w http.ResponseWriter) *responseWriterWithMetrics {
return &responseWriterWithMetrics{
ResponseWriter: w,
reponseWriterMetrics: reponseWriterMetrics{
responseWriterMetrics: responseWriterMetrics{
statusCode: -1,
resSize: 0,
},
Expand Down Expand Up @@ -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
})

Expand Down

0 comments on commit bd34f03

Please sign in to comment.