-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
get endpoint path variables #258
Conversation
* error with serve cmd from renovate updates. Re-populated pnpm-lock file
* switched to gorilla mux to extract path variables
* put variables in url path
I was having issues with running cmd/serve because I think renovate had made updates to pnpm-lock such that bazel was not supporting it anymore: I tried running bazel cmds to update the file: e.g but nothing seemed to work. I also changed the lockfile version manually in the file but then I started getting errors with the packages in the file saying I needed to include name and version fields for every single one of them. My fix for this was re-generating the file from scratch. Now there are conflicts and from a quick glance it's because I am downgrading many of the versions. Wanted to get a second opinion before I just accept the older versions. |
added gorilla/mux dependency. Since we include variables in the URL path - gorilla mux provides a way to easily access the path variables without having to regex. The regular net/http library does not have support for this. Gorilla mux is also compatible with most types from the net/http library making the interaction between the two pretty easy. |
i have also been experiencing this. seems to be because renovate is using a newer version of pnpm, which supports a newer version of pnpm lockfile. in the meantime, i'm also doing what you're doing, havnig to either run |
does the newer "mux.HandleFunc("GET /orders/{id}", func(w http.ResponseWriter, r *http.Request) {
id := r.PathValue("id")
fmt.Fprintf(w, "Get order with id: %s", id)
})"
// https://douglasmakey.medium.com/go-1-22s-http-package-updates-42aca70ceb9b#:~:text=mux.HandleFunc(%22GET%20%2Forders%2F%7Bid%7D%22%2C%20func(w%20http.ResponseWriter%2C%20r,order%20with%20id%3A%20%25s%22%2C%20id)%0A%7D) |
* removed image content field * changed to url for image on Google Drive
Store scans and their inference endpoint
…point add list receipts endpoint
…nb26/xat into refactor-get-receipt-endpoint
Ahh cool I see this was pretty recent. Must have missed it thanks! Have removed the dependency and swithced back to just using net/http |
Unlucky :( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you resolve merge conflicts @sunb26 |
…t-receipt-endpoint
…nb26/xat into refactor-get-receipt-endpoint
…b.com/sunb26/xat into refactor-get-receipt-endpoint" This reverts commit 620cb9c, reversing changes made to b9b178d.
…t-receipt-endpoint
lets goooooo |
Done exams and moving to TO ready to get back on the grind :)