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

usecases: remove unnecessary partial struct to validate config #655

Merged
merged 1 commit into from
Oct 7, 2021

Conversation

matheusalcantarazup
Copy link
Contributor

@matheusalcantarazup matheusalcantarazup commented Oct 7, 2021

Previously to validate the user input config we create a new struct
ConfigToValidate with all the fields of config and them validate,
since the fields from config is all public, this commit remove the
struct ConfigToValidate and check all fields from Config struct
directly. An improvement on error message also was made to make it
clearer.

Signed-off-by: Matheus Alcantara matheus.alcantara@zup.com.br

- What I did

- How to verify it

- Description for the changelog

Previously to validate the user input config we create a new struct
`ConfigToValidate` with all the fields of config and them validate,
since the fields from config is all public, this commit remove the
struct `ConfigToValidate` and check all fields from Config struct
directly. An improvement on error message also was made to make it
clearer.

Signed-off-by: Matheus Alcantara <matheus.alcantara@zup.com.br>
@wiliansilvazup wiliansilvazup merged commit 3bbda9c into main Oct 7, 2021
@wiliansilvazup wiliansilvazup deleted the improvement-usecases branch October 7, 2021 20:16
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.

None yet

3 participants