go-tlv
go-tlv copied to clipboard
feat: support to decode array and map
Add GetVariantArray to parse the value as an array. All nodes in the array have individual tag.
Add GetArray to parse the value as an array. All nodes in the array have the same tag.
Add GetVariantStringMap to parse the value as an key-value pair, the key type is string and each item have individual tag.
Add GetStringMap to parse the value as an key-value pair, the key type is string and each item have the same tag.
Summary
Describe the changes and fixes, or link to an existing issue.
Checklist
- [ ] I have added code related to the library scope that does not focus on a specific use case.
- [ ] I have not added a new dependency, or the code owners have agreed to it.
- [ ] I have written tests for the new code, or the existing tests cover it completely.
- [ ] I have not added
// nolint
comments to the code to fix linter issues. - [ ] I have not changed configuration files (CI, lint, templates, etc) without authorization.