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
Describe the bug
In order to write a test for a webhook handler, I would like to create sample webhook events, but cannot do so with a struct literal expression.
To Reproduce
Try to construct the following object:
Hi @mattdee123 thanks for raising this usability improvement. I'm wondering if we should do away with the embedding and just us a type alias. I'm unsure the reasoning why embedding was used in the first place.
We'll investigate some options here, but I don't think this is a bug and there is a simple workaround for it at the moment
Describe the bug
In order to write a test for a webhook handler, I would like to create sample webhook events, but cannot do so with a struct literal expression.
To Reproduce
Try to construct the following object:
This gives a compiler error. However,
Expected behavior
It would be nice if the above pattern, or something similar, could be used to construct test objects.
Additional context
This happens because the type is
and the embedded unexported field means we can't use a struct literal to create it, which is slightly annoying when writing tests.
The text was updated successfully, but these errors were encountered: