-
Notifications
You must be signed in to change notification settings - Fork 15
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
Add JSON output for blocks
command
#26
Conversation
return encoder.Encode(w.data) | ||
} | ||
|
||
func findBlocksInFile(fs afero.Fs, log *logrus.Logger, filename string, verbose, zeroTerminated, jsonOutput bool, stdin io.Reader, stdout, stderr io.Writer) error { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is starting to feel a bit unwieldy, with all the flags being passed as parameters. At some point, a command object containing the configuration should probably be created.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
agreed, but that is for another pr!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 👍
return encoder.Encode(w.data) | ||
} | ||
|
||
func findBlocksInFile(fs afero.Fs, log *logrus.Logger, filename string, verbose, zeroTerminated, jsonOutput bool, stdin io.Reader, stdout, stderr io.Writer) error { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
agreed, but that is for another pr!
# Conflicts: # README.md # cli/blocks_test.go # cli/cmds.go
Add the option for JSON blocks output to feed into other tools using, e.g.
jq
. Uses the flags--json
or-j
.Output format is
Depends on #25 and #22