Skip to content

Conversation

@lmika
Copy link
Contributor

@lmika lmika commented Jul 29, 2018

Hi @antonmedv,

Saw this on Golang Weekly and though it looked pretty good. Added a PR which dereferences pointers to structs when attempting to extract a field name so that pointers to structs can be used as data alongside regular structs. Example:

type Data struct {
   X int
}

data := &Data{X: 123}
result, err := expr.Eval("X", data)
// result == 123

Hope you find it useful.

Thanks,

Leon

@antonmedv
Copy link
Member

Really cool! Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants