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

Better error for unexported fields with container.In/Out #11943

Closed
Tracked by #11899
aaronc opened this issue May 11, 2022 · 2 comments
Closed
Tracked by #11899

Better error for unexported fields with container.In/Out #11943

aaronc opened this issue May 11, 2022 · 2 comments
Assignees

Comments

@aaronc
Copy link
Member

aaronc commented May 11, 2022

container.In and container.Out allow using struct fields for dependency provide inputs and outputs.

If an unexported field is in one of these structs, the container still tries to use it and go just panics.

The container should report an error and tell the user which field is the problem. We could consider just skipping unexported fields, but this might lead to more unexpected behavior. Probably better to keep the current behavior but improve the error message.

@aaronc aaronc changed the title Better handling of unexported fields with container.In/Out Better error for unexported fields with container.In/Out May 11, 2022
@JeancarloBarrios JeancarloBarrios self-assigned this Jul 27, 2022
@JeancarloBarrios
Copy link
Contributor

PR: #12786

1 similar comment
@JeancarloBarrios
Copy link
Contributor

PR: #12786

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

No branches or pull requests

3 participants