Closed golangisfun123 closed 2 weeks ago
The recent updates focus on enhancing security and functionality. Specific improvements include renaming headers and paths, adding new testing functions, introducing a gin-based middleware for tracing requests, and creating utilities for JSON beautification in the core/ginhelper
directory. Together, these changes improve the robustness and clarity of the API interactions and facilitate easier debugging and improved test coverage.
File/Path | Change Summary |
---|---|
contrib/screener-api/client/client.go |
Renamed headers and updated endpoint path in the BlacklistAddress function. |
contrib/screener-api/screener/screener.go |
Modified authMiddleware to handle new header names and improved message construction. |
contrib/screener-api/screener/suite_test.go |
Added functions for testing blacklist operations with randomized data and status checks. |
contrib/screener-api/screener/export_test.go |
Added import for github.com/synapsecns/sanguine/contrib/screener-api/config . |
core/ginhelper/README.md |
Introduced gindump , a middleware for dumping request and response data in a visually appealing way. |
core/ginhelper/gindump.go |
Added middleware and utility functions for tracing and dumping HTTP requests and responses, including a new parameter for callback functions. |
core/ginhelper/gindump_test.go |
Added tests for handling different MIME types using the new gin dump utilities. |
core/ginhelper/parse.go |
Added functions for beautifying JSON output and handling hidden fields in JSON structures. |
In lines of code where brilliance shines,
Headers changed, the path refines,
Gin now dumps with utmost grace,
JSON’s beauty finds its place.
A screener strong, tests with zeal,
Rabbit hops, with code that’s real. 🐇✨
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?
Attention: Patch coverage is 62.83525%
with 97 lines
in your changes missing coverage. Please review.
Project coverage is 25.77429%. Comparing base (
239a996
) to head (bc7107c
).
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
Description A clear and concise description of the features you're adding in this pull request.
Additional context Add any other context about the problem you're solving.
Metadata
Summary by CodeRabbit
New Features
Bug Fixes
Tests
Documentation
Chores