You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a need to marshal / unmarshal the contents of an &sarama.CreateAclsRequest. Unfortunately when marshaling a populated struct the fields permissiontype, resourcetype, resourcepatterntype, & operation come out as integers despite implementing encoding.TextMarshaler & encoding.TextUnmarshaler. The integer values aren't very meaningful to a human.
The receiver types on the encoding.TextMarshal and encoding.Unmarshal interfaces are pointers, while the types within the aforementioned struct are values. Also relevant is this go-yaml issue, though IMO this isn't really a bug, but just the way Go works.
Perhaps I am missing the actual issue, but should we convert the struct to contain pointers to these integer types?
The text was updated successfully, but these errors were encountered:
Description
I have a need to marshal / unmarshal the contents of an
&sarama.CreateAclsRequest
. Unfortunately when marshaling a populated struct the fieldspermissiontype
,resourcetype
,resourcepatterntype
, &operation
come out as integers despite implementing encoding.TextMarshaler & encoding.TextUnmarshaler. The integer values aren't very meaningful to a human.Versions
| Sarama | Kafka | Go |
|
v1.43.2
|N/A
|1.22.2
|Configuration
Logs
Additional Context
The receiver types on the encoding.TextMarshal and encoding.Unmarshal interfaces are pointers, while the types within the aforementioned struct are values. Also relevant is this go-yaml issue, though IMO this isn't really a bug, but just the way Go works.
Perhaps I am missing the actual issue, but should we convert the struct to contain pointers to these integer types?
The text was updated successfully, but these errors were encountered: