-
Notifications
You must be signed in to change notification settings - Fork 0
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
feature/length-padding #20
Conversation
I would still suggest the flag containing some kind of trigger word like "skip" or "unsafe". This flag is only a workaround for very unique projects. |
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.
Please add more tests to keep the test coverage.
We kinda have a problem, because there are optional fields. |
Since this is an workaround, we don't expect this to happen and no optional fields will be set when this flag is active. |
Codecov ReportAll modified and coverable lines are covered by tests ✅
|
Has been done, thanks for the reminder 🙂 |
What do we do about the naming situation? Would you like me to rename to |
We can go with type Option func(*Decoder)
func WithAutoPadding() Option {
return func(d *Decoder) {
d.autoPadding = true
}
} |
I would need some guidance with that as I looked into it and couldn't quite figure out how to apply this in the code base. |
thank you for implementing the functional options |
This is my first attempt at implementing #13
I am particularly unsure if I am supposed to pass command line args like that.
And yes, I know I called it
--auto-paddding
instead of--skip-length-validation-and-pad
.I think the latter is just too long as a command line flag (also having trouble finding a short version of it)
So therefore I propose
--auto-padding
or--payload-padding
or something similar.However, if you insist on your flag name I will gladly add another commit renaming it.
Please let me know if this is the right approach, or if you would like to have it done differently (coding wise).