hellofresh / goengine

Engine provides you all the capabilities to build an Event sourced application in go

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Anonymous struct

mumia opened this issue · 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.

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.