Fixing client initialization (#73)

This commit is contained in:
Harrison (Harry) Cramer
2023-10-31 17:58:15 -04:00
committed by GitHub
parent a055c4c988
commit 78d1ff52c4

View File

@@ -88,12 +88,9 @@ func main() {
}
type ClientString string
func withGitlabContext(next http.HandlerFunc, c Client) http.Handler {
return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
var cl ClientString = "client"
ctx := context.WithValue(context.Background(), cl, c)
ctx := context.WithValue(context.Background(), "client", c) //nolint:all
next.ServeHTTP(w, r.WithContext(ctx))
})
}