github.com/nikolay-turpitko/structor (go): Package structor contains interface and default implementation of EL (expression language) evaluator which evaluates EL expressions within tags of the struct, using optional additional struct as an extra context.  Basic idea is to use simple expression language within Go struct tags to compute struct fields based on other fields or provided additional context.  Due usage of reflection and EL interpretation, this package is hardly suitable for tasks, requiring high performance, but rather intended to be used during application setup or in cases where high performance is not an ultimate goal.  See tests for examples of usage with xpath, regexp, goquery, encryption, reading from files, shell invocation, etc.  Example is an example of structor's usage.  Whole struct tag string is used for EL expression. Interpreter based on "text/template" used to interpret it. Custom math and strings functions are used in expressions.   Example_complex is a more complex example of structor's usage.  Two interpreters are registered to process correspondent struct's tags. Custom strings functions are registered with custom prefix and name translations. EL uses value from other tag via execution context. One interpreter calls another to evaluate expression, got from some tag. Custom quotation marks are used in tags, when it's convenient.
Keywords: el|expression-language|go|golang|goquery|regexp|scraping|struct|struct-field-visitor|struct-walker|tags|xpath