Skip to content

Conversation

standrd
Copy link
Contributor

@standrd standrd commented Aug 21, 2025

Pull Request

Description

This adds proper typing to the different Meta() functions. Right now they are even crashing because Hyperliquid returns []any instead of map[string]any.

Type of Change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation update
  • Code refactoring
  • Performance improvement

Testing

  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • I have run make ci-full and all checks pass

Code Quality

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings

Additional Notes

Note that I wasn't sure where to add some testing for these functions, so I added them in the examples directory for now. Let me know if that needs work or what is the proper way to do this. I felt like these structs were complicated enough to need some sort of testing.

@coveralls
Copy link

Pull Request Test Coverage Report for Build 17137141633

Details

  • 134 of 994 (13.48%) changed or added relevant lines in 2 files are covered.
  • 34 unchanged lines in 1 file lost coverage.
  • Overall coverage decreased (-0.9%) to 16.454%

Changes Missing Coverage Covered Lines Changed/Added Lines %
info.go 28 94 29.79%
types_easyjson.go 106 900 11.78%
Files with Coverage Reduction New Missed Lines %
types_easyjson.go 34 18.36%
Totals Coverage Status
Change from base Build 17130790043: -0.9%
Covered Lines: 1794
Relevant Lines: 10903

💛 - Coveralls

@sonirico sonirico merged commit 4192e4e into sonirico:master Aug 21, 2025
4 checks passed
@sonirico
Copy link
Owner

sonirico commented Aug 21, 2025

thx @standrd ! In regards to testing, yeah, examples is a good place to start and quickly trigger manual-on-demand tests, however the canonical way to do this now is by employing https://github.com/dnaeon/go-vcr

You can have a look to #19 to see how it's done. I strongly encourage you to introduce more testing and thus incrementing coverage. Specially in regards to HL, whose API is evolving quite fast these days.

Merged your PR so as not to block dependants ;-).

@standrd
Copy link
Contributor Author

standrd commented Aug 21, 2025

thx @standrd ! In regards to testing, yeah, examples is a good place to start and quickly trigger manual-on-demand tests, however the canonical way to do this now is by employing https://github.com/dnaeon/go-vcr

You can have a look to #19 to see how it's done. I strongly encourage you to introduce more testing and thus incrementing coverage. Specially in regards to HL, whose API is evolving quite fast these days.

Merged your PR so as not to block dependants ;-).

Got it, never used this before in go, when I have time I will try this out for this piece of code, unless you decide to add it in the mean time of course.

@standrd standrd deleted the fix/typing-meta-info branch August 21, 2025 21:33
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.

3 participants