-
Notifications
You must be signed in to change notification settings - Fork 108
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
exploratory: dropping hex.String
#2045
Conversation
0147746
to
2ce82fc
Compare
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the 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? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #2045 +/- ##
==========================================
- Coverage 22.10% 21.79% -0.31%
==========================================
Files 357 357
Lines 15972 15891 -81
Branches 12 12
==========================================
- Hits 3530 3463 -67
+ Misses 12295 12279 -16
- Partials 147 149 +2
|
cb93f4a
to
1e8ec55
Compare
1e8ec55
to
2722ac1
Compare
44136f8
to
2cd0d42
Compare
c40ecb7
to
0ad4217
Compare
ecceede
to
e644383
Compare
hex.String
some more cleanuphex.String
3f394ec
to
081bf55
Compare
} | ||
|
||
func UnmarshalByteText(input []byte) ([]byte, error) { |
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.
replaced by ToBytes
since:
formatAndValidateText
is equivalent toIsValidHex
for every current call:
- inputs are never zero-lenght
- The check on lenght being even is implicitly done by
DecodeString
hex.Decode
behaviour withdec := make([]byte, len(raw)/encDecRatio)
matcheshex.DecodeString(
50c757f
to
252edd4
Compare
252edd4
to
c4ff546
Compare
909f650
to
d436976
Compare
d436976
to
caca212
Compare
if len(input)%2 != 0 { | ||
return nil, ErrOddLength |
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.
q: shouldn't this be part of ValidateBasicHex
but some UTs currently fail
hex.String
hex.String
Replaced by #2048 |
WIP, working on defining the wanted end state, will break this into smaller PR as soon as I have done.