Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

responseWriterのtypo修正 #98

Merged
merged 2 commits into from
Oct 24, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading