-
-
Notifications
You must be signed in to change notification settings - Fork 3k
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
ipfs stats bw
doesn't support --enc json
#5594
Comments
@MichaelMure |
This looks fixable, it's just a bit tricky. The encoder will be called once per item. |
How important is this. Maybe this is something we should wait on until we fix the need for using PostRun in most cases otherwise we run into the same problems we had with |
IMO, low priority. Most clients will just use HTTP directly. |
Several open issues mention problems with interaction of the global `--encoding=` flag and the Encoders and PostRun fields of command structs. This branch contains experimental refactors that explore approaches to consistent command execution patterns across offline, online and http modes. Specific tickets: - ipfs/kubo#7050 json encoding for `ls` - ipfs/kubo#1121 json encoding for `add` - ipfs/kubo#5594 json encoding for `stats bw` - ipfs#115 postrun design Possibly related: - ipfs/kubo#6640 global flags on subcommands Incomplete PRs: - ipfs/kubo#5620 json for 'stat'
Following the approach described in ipfs#115, define a new method signature on `Command` that supports full processing of the `Response` object when text encoding is requested. Add an encoding check and dispatch to DisplayCLI in local, http client, and http handler code paths. Unblocks resolution of `encoding` option processing in multiple go-ipfs issues. - ipfs/kubo#7050 json encoding for `ls` - ipfs/kubo#1121 json encoding for `add` - ipfs/kubo#5594 json encoding for `stats bw`
Following the approach described in ipfs#115, define a new method signature on `Command` that supports full processing of the `Response` object when text encoding is requested. Add an encoding check and dispatch to DisplayCLI in local, http client, and http handler code paths. Unblocks resolution of `encoding` option processing in multiple go-ipfs issues. - ipfs/kubo#7050 json encoding for `ls` - ipfs/kubo#1121 json encoding for `add` - ipfs/kubo#5594 json encoding for `stats bw`
Confirmed this is still a problem in 0.11. Extracting specific value via |
Version information:
go-ipfs 0.4.17 and git master
Type:
Bug
Description:
All commands should support the
--enc
options. It doesn't work foripfs stats bw
I suppose because the result of the command is formatted in aPostRun
instead of anEncoders
.The text was updated successfully, but these errors were encountered: