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

Public API? #831

Open
briantopping opened this issue May 25, 2021 · 3 comments
Open

Public API? #831

briantopping opened this issue May 25, 2021 · 3 comments

Comments

@briantopping
Copy link

briantopping commented May 25, 2021

Please describe your feature request.
Hi I love yq, appreciate that the syntax is well-known. Would like to integrate it into a golang app I am writing.

I'm sure it's simple enough to grab some API and link it in, but there's no stability contract there.

Any chance that a public API could be created and documented?

@mikefarah
Copy link
Owner

it's on my list of things to do :)

shouldn't be too far off having something - though it would be good to have input. I'm thinking of basically exposing the stream_evaluator and the all_at_once_evaluator, which basically lets you run expressions against yaml (via filenames, or directly as nodes).

Is that what you are looking for?

@briantopping
Copy link
Author

briantopping commented May 28, 2021

Yes, I am looking to provide the capability to dynamically search [EDIT: and replace] on a YAML tree of nodes. This code is an awkward implementation of what I suspect could be done very elegantly with yq.

@tamj0rd2
Copy link

tamj0rd2 commented Aug 4, 2022

I found this which shows an example of how to query a basic expression https://gist.github.com/mkatychev/80138136f05fd9cbbcb9b88047cba7ca

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

No branches or pull requests

3 participants