Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Anonymous struct #82

Open
mumia opened this issue Sep 7, 2023 · 1 comment
Open

Anonymous struct #82

mumia opened this issue Sep 7, 2023 · 1 comment

Comments

@mumia
Copy link

mumia commented Sep 7, 2023

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
Copy link
Author

mumia commented Sep 7, 2023

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant