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

Pretty print handler names #169

Closed

Conversation

airhorns
Copy link
Contributor

@airhorns airhorns commented Oct 29, 2020

This replaces and closes #138, closes #144.

This adds a handler function's name to the pretty printed route output. It uses Function.name, so no new dependencies or anything.

Before:

└── /test (GET)
    └── /hello
        ├── /
        │   └── :id (GET)
        │       :id (POST)
        └── world (GET)

After:

└── /test (GET testRoot)
    └── /hello
        ├── /
        │   └── :id (GET getHello)
        │       :id (POST postHello)
        └── world (GET helloWorld)

It required a kind of annoying change in how the handlers are iterated to pretty print, but that change is also necessary for the constrained route handler work in #166 so it's one more thing that I peeled out for merging separately.

@airhorns airhorns force-pushed the pretty-print-handler-names branch from 80af700 to a0e8905 Compare October 29, 2020 15:04
@airhorns airhorns force-pushed the pretty-print-handler-names branch from a0e8905 to e62123c Compare October 31, 2020 18:14
@airhorns airhorns marked this pull request as ready for review October 31, 2020 18:17
@airhorns
Copy link
Contributor Author

airhorns commented Nov 7, 2020

@delvedor are you the right person to review this? It's good to go!

Copy link
Collaborator

@mcollina mcollina left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@mcollina
Copy link
Collaborator

mcollina commented Nov 7, 2020

Yes, @delvedor is the right person.

@airhorns
Copy link
Contributor Author

@delvedor would love to get your feedback on this!

@airhorns
Copy link
Contributor Author

airhorns commented Feb 9, 2021

The work here has been merged in #170 so I am going to close this!

@airhorns airhorns closed this Feb 9, 2021
@airhorns airhorns deleted the pretty-print-handler-names branch February 9, 2021 13:43
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