-
Notifications
You must be signed in to change notification settings - Fork 388
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(gnoweb): simplify url parsing system #3366
Conversation
Signed-off-by: gfanton <[email protected]>
Signed-off-by: gfanton <[email protected]>
Signed-off-by: gfanton <[email protected]>
Signed-off-by: gfanton <[email protected]>
🛠 PR Checks SummaryAll Automated Checks passed. ✅ Manual Checks (for Reviewers):
Read More🤖 This bot helps streamline PR reviews by verifying automated checks and providing guidance for contributors and reviewers. ✅ Automated Checks (for Contributors):🟢 Maintainers must be able to edit this pull request (more info) ☑️ Contributor Actions:
☑️ Reviewer Actions:
📚 Resources:Debug
|
Signed-off-by: gfanton <[email protected]>
Codecov ReportAttention: Patch coverage is
📢 Thoughts on this report? Let us know! |
Signed-off-by: gfanton <[email protected]>
Should we update the breadcrumb (to add the query path) in the same PR? |
Signed-off-by: gfanton <[email protected]>
Signed-off-by: gfanton <[email protected]>
Signed-off-by: gfanton <[email protected]>
Signed-off-by: gfanton <[email protected]>
@alexiscolin I will do this in another PR ;) |
Co-authored-by: Morgan <[email protected]>
- Removing the concept of "kind" within the structure while still providing helpers to check if the method is pure or a realm: - Adding a new File field, trimming any file from the path when parsing and adding it to the structure. - Refining the regex to define what a path can be, based on what we have in `gnovm/pkg/gnolang/helpers.go` "var rePkgOrRealmPath = regexp.MustCompile(`^/[a-z][a-z0-9_/]*$`)" Signed-off-by: gfanton <[email protected]>
8d51e3b
to
8f93987
Compare
Signed-off-by: gfanton <[email protected]>
c6e36df
to
62b005a
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good 💯
Feel free to merge 🚀
Co-authored-by: Morgan <[email protected]>
depends on #3366 This PR cleans up, documents, and reorganizes the `gnoweb` package, which was recently revamped: * Refactored the code for better readability and structure, and added enhanced comments. * Enhanced existing test cases: * Added new test cases for `assets` in `app_test.go`. * Included a new test rule in the Makefile. * Created new tests for WebHandler in `handler_test.go`. * Improved file and directory handling methods in `handler.go`. --------- Signed-off-by: gfanton <[email protected]> Co-authored-by: Morgan <[email protected]>
This PR simplifies the URL parsing system:
regexp
that was introduced in thegnoweb
revamp.GnoURL
.Encode
method more composable to adapt to various use cases.