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

Fix panic when embedded type uses a forbidden import #111

Merged
merged 3 commits into from
Sep 10, 2024

Conversation

hariso
Copy link
Contributor

@hariso hariso commented Sep 10, 2024

Description

Currently, if a configuration struct has an embedded field that references a type that is not allowed, paramgen panics when trying to return an error that describes the issue and the offending field's name. This is because an embedded field has no explicit field name: https://go.dev/ref/spec#Struct_types.

Quick checks:

  • I have followed the Code Guidelines.
  • There is no other pull request for the same update/change.
  • I have written unit tests.
  • I have made sure that the PR is of reasonable size and can be easily reviewed.

@hariso hariso requested a review from a team as a code owner September 10, 2024 08:45
Copy link
Member

@lovromazgon lovromazgon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👏

@lovromazgon lovromazgon enabled auto-merge (squash) September 10, 2024 16:56
@lovromazgon lovromazgon merged commit bc57e99 into main Sep 10, 2024
3 checks passed
@lovromazgon lovromazgon deleted the haris/panic-on-embedded-field branch September 10, 2024 16:59
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

Successfully merging this pull request may close these issues.

2 participants