Closed Sadzeih closed 3 months ago
While trying to insert an empty slice in a blob, I kept getting the same error;
missing field `base64`
While reading the library code, I noticed that if Base64 was and empty string "", due to omitempty, it was not marshalled.
""
omitempty
Which caused the issue.
The fix is to simply make Base64 into a pointer. That means for the blob type, the pointer will not be nil and will be marshalled.
nil
Thank you for your contribution @Sadzeih
While trying to insert an empty slice in a blob, I kept getting the same error;
While reading the library code, I noticed that if Base64 was and empty string
""
, due toomitempty
, it was not marshalled.Which caused the issue.
The fix is to simply make Base64 into a pointer. That means for the blob type, the pointer will not be
nil
and will be marshalled.