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.
httpaux
✓ github.com/xmidt-org/httpaux
Wraps a handler with a custom header.
package main
import (
"fmt"
"net/http"
"github.com/xmidt-org/httpaux"
)
func main() {
handler := httpaux.WithHeader("X-Custom", "value")(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
fmt.Fprintln(w, "Hello")
}))
http.Handle("/", handler)
}
Debug
Known issues
No known issues recorded.
Upgrade
Version history
0.4.3latest on pkg.go.dev
Audit
Dependencies
No dependency data recorded yet.