Skip to content

Commit

Permalink
Merge pull request #98 from mazrean/fix/typo
Browse files Browse the repository at this point in the history
responseWriterのtypo修正
  • Loading branch information
mazrean committed Oct 24, 2023
2 parents 33c1b2e + 399b924 commit 774e24a
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: 200,
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 774e24a

Please sign in to comment.