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

Question for all using this library - is the hierarchical error structure useful? #99

Closed
deankarn opened this issue Jul 5, 2015 · 2 comments
Labels
Milestone

Comments

@deankarn
Copy link
Contributor

deankarn commented Jul 5, 2015

Hello All!

Since implementing the "dive" tag, I have been questioning whether the hierarchical data structure is the best option, mainly because of the extra overhead and placeholder errors needed.

I could store the struct name, field name and name-spaced name on the field error and could just return a map of map[string]*FieldError where the key is the name-spaced name; with this approach I should be able to make validator even faster and more efficient.

my only concern is getting rid of the hierarchical functionality in case someone is using it or it would be beneficial to keep.

so should I just return a map of errors?

@deankarn deankarn added this to the Questions milestone Jul 5, 2015
@deankarn
Copy link
Contributor Author

deankarn commented Jul 5, 2015

@manucorporat I would definitly be interested in your opinion

@deankarn
Copy link
Contributor Author

After a bunch of discussions it has been decided, in v6 I will drop the error hierarchy and just return the field errors. see #74

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant