Skip to content

Conversation

0xk1f0
Copy link
Contributor

@0xk1f0 0xk1f0 commented Sep 2, 2025

As already determined in #2259, it would make sense to start phasing out gorilla/mux in all of incus, this PR aims to do just that.

Worth noting that http.ServeMux does not implement a NotFoundHandler, but since we already overwrite ServeHTTP, I tried to do a trivial reimplementation of it, which just checks if a Handler for a given route exists and executes a supplied function if not.

Most of the other changes here consist of replacing mux.Vars(r)[] with r.PathValue(). This all builds fine, but I have not extensively tested this yet, which is on my to-do list for the next coming days.

@0xk1f0 0xk1f0 requested a review from stgraber as a code owner September 2, 2025 20:20
@stgraber stgraber marked this pull request as draft September 3, 2025 02:14
@stgraber
Copy link
Member

stgraber commented Sep 3, 2025

Mark as Draft until the regressions can be sorted out :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants