mirror of
https://github.com/open-policy-agent/opa.git
synced 2026-08-12 19:32:48 -06:00
30d3346fb4
This was something I originally intended to use in another project, but since this turned out to be a better implementation (subject of course to review!) in terms of both performance and simplicity, I figured we might as well use it here too. Some changes include: - `MustParse` to parse known valid versions - Allocates nothing in any operations other than 1 alloc in `String()` - Ignores empty `PreRelease` and `Metadata` fields in serialization - `encoding.TextAppender` implementation to serialize without allocating - A whole bunch of benchmarks Signed-off-by: Anders Eknert <anders@eknert.com>