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.
requestid
✓ github.com/ascarter/requestid
Wraps an HTTP handler to add request ID support.
package main
import (
"fmt"
"net/http"
"github.com/ascarter/requestid"
)
func main() {
handler := requestid.Handler(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
id := requestid.Get(r)
fmt.Fprintf(w, "Request ID: %s", id)
}))
http.ListenAndServe(":8080", handler)
}
Debug
Known issues
No known issues recorded.
Upgrade
Version history
0.0.0-20170313220838-5b76ab3d4aeelatest on pkg.go.dev
Audit
Dependencies
No dependency data recorded yet.