-
-
Notifications
You must be signed in to change notification settings - Fork 610
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
Simple usage example of the public API #2021
Labels
Comments
how to disable log |
Like this: package controllers
import (
glog "gopkg.in/op/go-logging.v1"
)
// In production main func will take care of setting the log yq-lib log level.
// In test we count on this to set the default log level for all tests.
// We do this because yqlib log is very chatty even if it is sometimes very useful.
// Of course in an individual test one could change the level and reset to the default
// via a defer call.
func init() {
glog.SetLevel(glog.WARNING, "yq-lib")
} |
Thanks |
OMG! Thank you for this. Using |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hello.
I just would like to provide a basic usage example of the API that yq offers. I don't know if the API is stable, but currently, this works:
I'm leaving this for anyone looking for examples for using the library instead of the CLI. I haven't found any documentation describing that, so most of the knowledge came from looking at the tests and the CLI.
The text was updated successfully, but these errors were encountered: