-
Notifications
You must be signed in to change notification settings - Fork 17.9k
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
Testing: console output and json file print out at the same time? #37204
Comments
See unix |
This looks like a general programming question, not a Go issue. See https://github.com/golang/go/wiki/Questions.
Since test output goes to stdout, you can separate your console output using stderr, e.g. |
🤔For example, if using 'go test -json > gotest.json test_folder_name'. The whole test output will be stored in gotest.json. I am looking for a way to keep both. Any thoughts on it? |
Post your Q on golang-nuts mailing list. |
Suggestion from Gohphers slack: |
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
Yes
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
go test -v -json > gotest.json
What did you expect to see?
I am looking for a way to print out on the console and generate the json file at the same time.
What did you see instead?
only json file without console output
The text was updated successfully, but these errors were encountered: