Our great sponsors
-
validator
:100:Go Struct and Field validation, including Cross Field, Cross Struct, Map, Slice and Array diving
-
ozzo-validation
An idiomatic Go (golang) validation package. Supports configurable and extensible validation rules (validators) using normal language constructs instead of error-prone struct tags.
-
WorkOS
The modern identity platform for B2B SaaS. The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.
-
expr
Discontinued Expression language and expression evaluation for Go [Moved to: https://github.com/expr-lang/expr] (by antonmedv)
-
InfluxDB
Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.
github.com/go-playground/validator/ has a bug with nested struct which breaks. Also somewhat limited Ruleset it seems.
https://github.com/go-ozzo/ozzo-validation Seems to do what I need but likely will need some convoluted reflection to build out the rules. Also likely some custom rules to be written which is okay since it's a one time cost and reuse in the expressions.
https://github.com/antonmedv/expr/ Seems really promising though having a rough time finding examples or basic do something as simple as struct.Value == N though I did find some examples on iterating and such.
https://github.com/google/cel-go Didn't find much support for structs.
Otto https://github.com/robertkrimen/otto Seems interesting. It lets me call Go functions from inside JS as well as return results. The fncs pattern reminds me a bit of how the template engine works.