Skip to content

Commit

Permalink
Fixing client initialization (#73)
Browse files Browse the repository at this point in the history
  • Loading branch information
harrisoncramer authored Oct 31, 2023
1 parent a055c4c commit 78d1ff5
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions cmd/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -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))
})
}
Expand Down

0 comments on commit 78d1ff5

Please sign in to comment.