Install & Compatibility
Where this runs
No compatibility data collected yet for this library.
Code
Verified usage
Verified import paths — ran on the pinned version, not inferred.
stats
✓ github.com/thoas/stats
Add request statistics middleware to an HTTP server.
package main
import (
"net/http"
"github.com/thoas/stats"
)
func main() {
h := stats.New()
http.HandleFunc("/stats", func(w http.ResponseWriter, r *http.Request) {
w.Write(h.Snapshot())
})
http.ListenAndServe(":8080", h.Handler(http.DefaultServeMux))
}
Debug
Known issues
No known issues recorded.
Upgrade
Version history
0.0.0-20190407194641-965cb2de1678latest on pkg.go.dev
Audit
Dependencies
No dependency data recorded yet.