Skip to content
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

added int and []byte type to entry unmarshal #382

Merged
merged 3 commits into from Jun 27, 2022
Merged

added int and []byte type to entry unmarshal #382

merged 3 commits into from Jun 27, 2022

Conversation

4xoc
Copy link
Contributor

@4xoc 4xoc commented Jun 25, 2022

Based on the ground work of #304 this PR adds two additional supported variable types: int and []byte.

@cpuschma cpuschma self-assigned this Jun 25, 2022
@cpuschma
Copy link
Member

Thank you for your PR! May you add support for int64 as well, as the go-asn1-ber supports up to 64 bits integers.

I have been thinking about using the raw bytes instead of the already generated string to avoid additional type conversions, but this might blow up the code since we don't know how many bytes one attribute has.. Maybe in the future, when adding support for more (or even custom) types we should switch to ber.ParseInteger instead, to reduce the boilerplate and unnecessary conversions.

v3/search.go Outdated Show resolved Hide resolved
@4xoc
Copy link
Contributor Author

4xoc commented Jun 27, 2022

Added int64 now too. Happy to add more builtin types, just started with the ones I need myself.

Copy link
Member

@cpuschma cpuschma left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Thank you for your PR! 🥰
I'll leave this PR open for a few days for other contributors to comment. I'll merge this if no one subjects.

@cpuschma cpuschma changed the title added int and []byte type added int and []byte type to entry unmarshal Jun 27, 2022
@cpuschma cpuschma merged commit 83b05cd into go-ldap:master Jun 27, 2022
inv2004 pushed a commit to inv2004/ldap that referenced this pull request Jan 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants