quartzgun/util/util.go

11 lines
195 B
Go
Raw Permalink Normal View History

package util
import (
"context"
"net/http"
)
func AddContextValue(req *http.Request, key string, value interface{}) {
*req = *req.WithContext(context.WithValue(req.Context(), key, value))
}