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

Problem with embedded structs during pact testing #229

Open
TorbenCK opened this issue Jul 11, 2022 · 2 comments
Open

Problem with embedded structs during pact testing #229

TorbenCK opened this issue Jul 11, 2022 · 2 comments

Comments

@TorbenCK
Copy link

TorbenCK commented Jul 11, 2022

In our Golang api application, we use embedded struct. However, when we use pact-go it does not seem to support embedded structs. Is there a plan to support this in the near future?

srcType.Field.Anonymous allow differentiation between embedded and normal structs and could be used in pact matcher.go in func match(srcType reflect.Type, params params). JSON Marshal could serve as inspiration, see here: https://play.golang.org/p/PzncHdyUUL5

@TorbenCK TorbenCK changed the title Problem with embedded structs Problem with embedded structs during pact testing Jul 11, 2022
@mefellows
Copy link
Member

Hi, I'd be happy to support it. Would you be interested in submitting a PR?

@TorbenCK
Copy link
Author

Good to hear. Yes, we currently thinking about if we fix this for ourself and then submit it as PR here.

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

2 participants