coerceArraySize ensures we can compare constant array lengths. msgpack array headers are 32 bit unsigned, which is reflected in the ArrayHeader implementation in this library using uint32. On the Go side, we can declare array lengths as any constant integer width, which breaks when attempting a dir
(asz string)
| 988 | // can declare array lengths as any constant integer width, which breaks when |
| 989 | // attempting a direct comparison to an array header's uint32. |
| 990 | func coerceArraySize(asz string) string { |
| 991 | return fmt.Sprintf("uint32(%s)", asz) |
| 992 | } |