11 lines
195 B
Go
11 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))
|
||
|
}
|