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

Define http handlers as functions #6

Merged
merged 1 commit into from
Jun 30, 2021

Conversation

jossemarGT
Copy link
Contributor

Background

Hi, is me again :octocat:. I just finished with the revealgo + multiplex integration, and you can see how it looks on this branch. Unfortunately, when I was cleaning up what I did on said branch I found myself doing a mild refactor in the process, so instead of disturbing you with a big change I would rather split it in two separated pull requests (so expect another one coming from my side).

What changed?

I did a mild refactor with the sole goal of reutilizing the exisiting handlers alongside others and the stdlib ones. In this way the upcoming changes can be designed as small "middlewares" insted of complex types with some business logic on them.

By the way, I think this might solve #4 since now revealgo uses the http.Dir stdlib function to serve the content. Either way, I am not 100% since I am not a Windows user 🤷‍♂️.

I did a mild refactor with  the sole goal of reutilizing the
exisiting handlers alongside others and the stdlib ones. In this
way the upcoming changes can be designed as small "middlewares"
insted of a complex type with some business logic on them.
@yusukebe
Copy link
Owner

Great pull request! Your refactoring makes our code simple and short.
Thank you.

@yusukebe yusukebe merged commit f6f6fe6 into yusukebe:master Jun 30, 2021
@jossemarGT jossemarGT deleted the feature/func-http-handlers branch June 30, 2021 02:51
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

Successfully merging this pull request may close these issues.

2 participants