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

Remove go-ozzo/ozzo-validation package #56

Merged
merged 1 commit into from
Dec 23, 2024
Merged

Conversation

zkonak
Copy link
Contributor

@zkonak zkonak commented Dec 19, 2024

with that, we are no longer dependent on ozzo packages which is an external package and is no longer maintained

without this, we are dependent on a external package that is very old

with that, we are no longer dependent on ozzo packages which is an external package and is no longer maintained

without this, we are dependent on a external package that is very old
@zkonak zkonak changed the title Remove go-ozzo/ozza-validation package Remove go-ozzo/ozzo-validation package Dec 19, 2024
validation.Field(&ldapConfig.BindDN, validation.Required, validation.Length(2, 200)),
validation.Field(&ldapConfig.BindPassword, validation.Required, validation.Length(2, 200)),
)
err = validateConfig(config)
Copy link
Contributor

Choose a reason for hiding this comment

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

validate config inside MakeConfig is very confusing.

Can't we simply use the MakeConfig as a constructor based on the config provided in the main, and validate all we need directly?

I am fine with splitting the function to make it clearer, so I am fine with validateLdapConfig. However, I believe that validation can be done immediately in a single step.

Also, we don't need to create validation functions, unless they are used multiple times and make it easier to read.

In all cases, don't forget to add tests...

Copy link
Contributor

@evrardjp-cagip evrardjp-cagip left a comment

Choose a reason for hiding this comment

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

I will merge this and implement the rest as follow up work.

@evrardjp-cagip evrardjp-cagip merged commit bea3378 into master Dec 23, 2024
6 checks passed
@evrardjp-cagip evrardjp-cagip deleted the feat/remove-go-ozzo branch December 23, 2024 13:50
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.

3 participants