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

Proposal: Generage Jennifer from Value #58

Open
josephlewis42 opened this issue Mar 27, 2019 · 3 comments
Open

Proposal: Generage Jennifer from Value #58

josephlewis42 opened this issue Mar 27, 2019 · 3 comments

Comments

@josephlewis42
Copy link

Hi Dave,

What would you feel about adding a utility that generates code using reflect.Value? The goal is to create something similar to the %#v fmt directive.

My immediate goal is building a tool that turns YAML files into pre-populated go structs, but I could see it being used other places where you want to create a reproducible instance of something. For example, a fuzzer could create a single file with a minimal working example of a struct that fails or a rules engine could compile together a bunch of rules generated from user-defined files.

Cheers!
- Joseph

@dave
Copy link
Owner

dave commented Mar 27, 2019

Sounds good! I’m going to be trekking across Nepal for five months this summer, so won’t have my laptop or much internet ... but it sounds like this could be an external utility instead of a Jennifer feature?

@josephlewis42
Copy link
Author

Sure, I'm happy to build it then give you a PR to something like jenniferutils once you're back if you're interested. I understand not wanting to modify the core, but I bet a project you owned would have more interest than something I build. :-)

Enjoy your trip!

@dave
Copy link
Owner

dave commented Mar 27, 2019

Sounds like a good plan... I should be back in September. 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

No branches or pull requests

2 participants