Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: codegen to fetch from env without reflect #193

Merged
merged 1 commit into from
Aug 4, 2021

Conversation

tufitko
Copy link
Contributor

@tufitko tufitko commented Aug 3, 2021

Fetch methods generates for all struct/map/array/string named types (exception is map types with unnamed not basic key type like map[struct{...}]int)
To generate just call exprgen with pkg paths as arguments: exprgen pkg1 pkg2...
After call, file *pkg_name*_exprgen.go will be created

What do you think about it?

@antonmedv
Copy link
Member

Hi 👋
Awesome stuff! Let’s write documentation on it and merge.

@tufitko
Copy link
Contributor Author

tufitko commented Aug 4, 2021

Added!

@antonmedv
Copy link
Member

Thanks.

@antonmedv antonmedv merged commit 13e1bdc into expr-lang:master Aug 4, 2021
echo(`--imports`)
echo(``)

echoRaw(`func toInt(a interface{}) int {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What about exporting it from vm.ToInt?

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