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

ParseConfig should call the custom Validate method #229

Merged
merged 5 commits into from
Jan 10, 2025

Conversation

hariso
Copy link
Contributor

@hariso hariso commented Dec 24, 2024

Description

In #198, a method for custom validation of configuration structs was added.

Given that callers of ParseConfig also want to validate the method, and that ParseConfig already does some validations (based on parameter specs), ParseConfig should call the Validate() method on a config, if it exists.

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 December 24, 2024 15:10
@hariso hariso self-assigned this Jan 9, 2025
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.

👍

util.go Outdated Show resolved Hide resolved
@hariso hariso enabled auto-merge (squash) January 10, 2025 09:33
@hariso hariso merged commit 2b0b3ff into main Jan 10, 2025
3 checks passed
@hariso hariso deleted the haris/move-validate-into-parse-config branch January 10, 2025 14:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

2 participants