Skip to content
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

Fix Router.Scope implementation #8

Open
markuswustenberg opened this issue Oct 25, 2024 · 0 comments
Open

Fix Router.Scope implementation #8

markuswustenberg opened this issue Oct 25, 2024 · 0 comments

Comments

@markuswustenberg
Copy link
Member

No description provided.

markuswustenberg added a commit that referenced this issue Oct 25, 2024
This adds a new `middleware` package as well as `middleware.Flags`, which allows
you to supply a callback function receiving a `flag.FlagSet` to define flags on.

In order to make this work, middleware is now applied before route matching.
Otherwise, middleware can't change the route matching, which is necessary, because
flags are part of the route before parsing.

I had to disable `Router.Scope` because I can't currently make it work with the middleware
changes, and I'm prioritizing the flags feature. See #8.

Fixes #4
markuswustenberg added a commit that referenced this issue Oct 25, 2024
This adds a new `middleware` package as well as `middleware.Flags`,
which allows you to supply a callback function receiving a
`flag.FlagSet` to define flags on.

In order to make this work, middleware is now applied before route
matching. Otherwise, middleware can't change the route matching, which
is necessary, because flags are part of the route before parsing.

I had to disable `Router.Scope` because I can't currently make it work
with the middleware changes, and I'm prioritizing the flags feature. See
#8.

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

No branches or pull requests

1 participant