goengine icon indicating copy to clipboard operation
goengine copied to clipboard

Anonymous struct

Open mumia opened this issue 2 years ago • 1 comments

Hi.

Was investigating this lib to use in a project and ran into some issues with payload registration.

Wanted to ask why the use of anonymous structs is even allowed. See https://github.com/hellofresh/goengine/blob/master/strategy/json/payload_transformer_test.go#L139

They seem to result in an empty string when you try to reflect their name.

mumia avatar Sep 07 '23 07:09 mumia

I have a fix for the issue, but wanted to understand if anonymous structs are really a necessity or were just used to simplify testing.

mumia avatar Sep 07 '23 07:09 mumia