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

Remove Globals #60

Open
josephspurrier opened this issue Apr 23, 2017 · 2 comments
Open

Remove Globals #60

josephspurrier opened this issue Apr 23, 2017 · 2 comments

Comments

@josephspurrier
Copy link
Contributor

Is there a reason why these must be called on the vestigo package instead of on the router? If someone wanted to use more than one router, they couldn't set this methods on the individual instances of the router. It also complicates testing because you can't guarantee state.

vestigo.AllowTrace = true
vestigo.CustomNotFoundHandlerFunc(fn)
vestigo.CustomMethodNotAllowedHandlerFunc(fn)
vestigo.Param(r, name)

@husobee
Copy link
Owner

husobee commented Apr 24, 2017

Yes, I agree. It would be nice to be able to have multiple instances of routers, and allow for cleaner testing. Will see what I can put together, unless you have a fork with a proof of concept already implemented.

@josephspurrier
Copy link
Contributor Author

josephspurrier commented Apr 26, 2017

Nah, I don't have a fork yet. Let me know if you need any help testing.

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

2 participants