quartzgun/util/util.go

10 lines
195 B
Go

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