Commit ef25ea2
authored
feat(go): add missing type resolver for uint{16,32,64}slice (#3311)
## Why?
The `uint` serializer and specific `uint16`, `uint32`, `uint64` slice
serializers were implemented but missing from the `TypeResolver`
registration and dispatch logic. This caused `not supported` errors when
using these types.
## What does this PR do?
1. **Type Registration**:
* Registers `uint16Type`, `uint32Type`, and `uint64Type` in
`newTypeResolver` initialization to ensure `decodeType` can correctly
resolve these type strings.
2. **Serializer Dispatch**:
* Updates `createSerializer` in `type_resolver.go` to correctly dispatch
to the existing optimized `uint16SliceSerializer`,
`uint32SliceSerializer`, and `uint64SliceSerializer` for the
corresponding slice types.
3. **Tests**:
* Adds test cases in `TestTypeResolver` (`type_test.go`) to verify that
`[]uint16`, `[]uint32`, and `[]uint64` are correctly resolved and
serialized.
## Related issues
## Does this PR introduce any user-facing change?
- [ ] Does this PR introduce any public API change?
- [ ] Does this PR introduce any binary protocol compatibility change?
## Benchmark1 parent 9668497 commit ef25ea2
2 files changed
Lines changed: 12 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
248 | 248 | | |
249 | 249 | | |
250 | 250 | | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
251 | 254 | | |
252 | 255 | | |
253 | 256 | | |
| |||
1704 | 1707 | | |
1705 | 1708 | | |
1706 | 1709 | | |
| 1710 | + | |
| 1711 | + | |
| 1712 | + | |
| 1713 | + | |
| 1714 | + | |
| 1715 | + | |
1707 | 1716 | | |
1708 | 1717 | | |
1709 | 1718 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
43 | 43 | | |
44 | 44 | | |
45 | 45 | | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
46 | 49 | | |
47 | 50 | | |
48 | 51 | | |
| |||
0 commit comments