Skip to main content
AI Assist is now on Stack Overflow. Start a chat to get instant answers from across the network. Sign up to save and share your chats.
0 votes
1 answer
83 views

I'm working on a simple toy API in Golang using httprouter and trying to write tests for my endpoints. One of my endpoints is a "show movie" endpoint with a path like /v1/movies/:id . For ...
wubbalubba's user avatar
1 vote
1 answer
146 views

I'm trying to run an angular compiled application in Golang with EmbedFS but no success. I'm new with Golang so I have troubles to make it working. My Golang app structure is -- project | - cmd ...
Vic VKh's user avatar
  • 311
2 votes
1 answer
3k views

So I want to get rid of one more dependency (gorilla/mux) and use the std http.ServeMux with it's new routing patterns. The problem is, that gorilla/mux had this concept of a subrouter, which could ...
microo8's user avatar
  • 3,844
3 votes
1 answer
2k views

I have a proxy server that can be deactivated by config, with mustBeSecure. I want this proxy to act different in a certain subdomain: "/application/health", allowing it always insecure. All ...
Gabriel Carrera's user avatar
1 vote
1 answer
122 views

I am moving my handler from net/http / mux to httprouter and my tests are failing. I am doing a request to a server running in a separate go routine. httprouter is complaining that the path must start ...
puppeteer701's user avatar
  • 1,285
2 votes
1 answer
1k views

i am creating a base router and adding few middlewares and health check route as below baseRouter := chi.NewRouter() baseRouter.Use(middleware.Logger) baseRouter.Use(core.CorsHandler) baseRouter.Get(&...
vignesh's user avatar
  • 588
2 votes
2 answers
982 views

I want to expose the following URLs from my service: GET /api/foo GET /api/bar I also want to structure it as a router nested inside another. The toplevel router will match all requests to /api and ...
Yawar's user avatar
  • 11.7k
1 vote
1 answer
934 views

I am trying to start two http server on different ports, but unable to use the same pattern: handlerFunc1 := http.HandlerFunc(hello1) http.Handle("/", handlerFunc1) server1 := &http....
Chris G.'s user avatar
  • 26.4k
0 votes
2 answers
928 views

httprouter does not allow this and panics when start. httprouter :panic: wildcard route ':name' conflicts with existing children in path '/hello/:name'. In my understanding, "/hello/:name"...
桃桃桃子's user avatar
0 votes
1 answer
636 views

Below is the code I run the issue is that I get 404 page not found instead of the graphql playground page Is it possible to work with httprouter with gqlgen or do I need to go back to chi or mux I ...
Amir Haouala's user avatar
3 votes
1 answer
5k views

Any help here is appreciated! I'm sure that I'm missing something really basic. The problem I have is I am trying to get a value out of context in a demo web application, and I'm receiving the error: ...
ngriffin's user avatar
  • 347
0 votes
1 answer
855 views

I'm thinking about the following scenario: Suppose I want have handler X in which I have made some calculations but now want to forward to another handler Y before returning the request. It would be ...
Jiulin Teng's user avatar
0 votes
1 answer
364 views

I just learnt how to use the httprouter go package and read many documents about it but failed to use the :name style of passing paramenters toe templates when it comes to the index page template. ex. ...
Rodgers Ategyeka's user avatar
1 vote
1 answer
922 views

How can I use TLS/SSL Client Authentication for specific Hosts when using a reverse proxy like httprouter by julienschmidt? I could set a Client Certificate in a global matter with http....
hdev's user avatar
  • 6,627
0 votes
1 answer
11k views

I am new in Go. So please provide an example with your answer. I am using julienschmidt/httprouter. I am able to parse one parameter with this but how can I parse multiple parameters using this or any ...
Mohit Yadav's user avatar

15 30 50 per page