Repository navigation
chore: refactor to fasthttp, upgrade dependencies, improve test coverage to 96% - #23
Merged
Merged
Conversation
- Simplify Config.merge() using explicit field assignment instead of reflection - Optimize Context Query/Param methods, remove redundant empty string checks - Clean up request/response struct field names (originReq->req, etc.) - Simplify router code structure - Add convenience methods: JSONError, IsAjax, IsWebSocket, etc. - Replace panic with graceful error handling in Static() - Remove deprecated ParamString and QueryString methods BREAKING CHANGES: - Renamed internal struct fields (originReq, paramsMap, originRes, etc.) - Removed deprecated ParamString and QueryString methods
Add tests for new Context methods: - JSONError, IsAjax, IsWebSocket, ContentType, AcceptedLanguages - HTML template rendering - File serving with error handling Add tests for Application methods: - Config.merge with various scenarios - Static file serving with absolute paths - LoadHTMLGlob and SetFuncMap - RunGracefulShutdown and Shutdown Add tests for Response: - File error handling (not found, invalid path) - Flush with cookies and redirects Add tests for Router: - Wildcard route matching (*filepath) - Param extraction for multiple parameters - Conflicting route resolution Fix router wildcard matching bug where search would not properly return wildcard node with pattern.
Replace Children slice with map[string]*node for constant-time lookup in node.matchChild(). This significantly improves routing performance when there are many sibling routes at the same level.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR brings significant performance improvements and dependency updates:
Major Changes
Dependencies Upgraded
Added
Performance
Fixed