protovalidate-go icon indicating copy to clipboard operation
protovalidate-go copied to clipboard

Document recommendation for instantiating/managing validator instances

Open rodaine opened this issue 2 years ago • 2 comments

Title. A few strategies are available, but want to encourage folks to reuse a validator instead of creating a new one for every call to Validate.

rodaine avatar Oct 26 '23 16:10 rodaine

You can compare this to the database instance. You create a database instance that you use everywhere, instead of creating a new one every time you need to query something. The same goes with validator instance

Masedko avatar Oct 26 '23 18:10 Masedko

I like that, @Masedko!

rodaine avatar Oct 30 '23 17:10 rodaine