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

feat: add a default validator to make it more convenient #4382

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Linde7777
Copy link

This is a draft version, there are tests failed, I will fix them if this idea is passed.
I use init() to initialize the validator, which will cause the validator(atomic.Value) inconsistent, fail the test TestParseWithValidator

@kevwan
Copy link
Contributor

kevwan commented Sep 19, 2024

I think you can change your template.

@Linde7777
Copy link
Author

A goctl template can do this, but this default validator feature let user don't need to write any code, for the lazy man like me, it is convenient

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