You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: Readme.md
+1-62Lines changed: 1 addition & 62 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -70,7 +70,7 @@ func main() {
70
70
w.WriteHeader(http.StatusOK)
71
71
w.Write([]byte("hello world!"))
72
72
})
73
-
h = middlewarestd.Measure("", mdlw, h)
73
+
h = middlewarestd.Handler("", mdlw, h)
74
74
75
75
// Serve metrics.
76
76
log.Printf("serving metrics at: %s", ":9090")
@@ -86,67 +86,6 @@ func main() {
86
86
87
87
For more examples check the [examples]. [default][default-example] and [custom][custom-example] are the examples for Go net/http std library users.
88
88
89
-
## V1 migration
90
-
91
-
From `v0` to `v1` the middleware API has changed (not the metrics API or metric implementations).
92
-
93
-
This changes was because `v0` started with `http.Handler` in mind, but then the support for some libs/middlwares were implemented, the way these frameworks/libraries are designed itself, are not compatible with go's `http.Handler`, but we want to support these and many more. So to be able to support these correctly and many more,an internal big refactor was required, this lead us to the need to leak a little bit of this internal refactor.
94
-
95
-
Here is how you can migrate the standard `http.Handler` from one to another (the other framework/lib migrations are straignforward).
0 commit comments