Skip to content

Commit 2973fdb

Browse files
committed
Rename streamResults to streamResult.
License: MIT Signed-off-by: Kevin Atkinson <[email protected]>
1 parent e21f234 commit 2973fdb

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

core/commands/cid.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ The optional format string is a printf style format string:
8484
return emitCids(req, resp, opts)
8585
},
8686
PostRun: cmds.PostRunMap{
87-
cmds.CLI: streamResults(func(v interface{}, out io.Writer) nonFatalError {
87+
cmds.CLI: streamResult(func(v interface{}, out io.Writer) nonFatalError {
8888
r := v.(*CidFormatRes)
8989
if r.ErrorMsg != "" {
9090
return nonFatalError(fmt.Sprintf("%s: %s", r.CidStr, r.ErrorMsg))

core/commands/commands.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -153,10 +153,10 @@ func unwrapOutput(i interface{}) (interface{}, error) {
153153

154154
type nonFatalError string
155155

156-
// streamResults is a helper function to stream results that possibly
156+
// streamResult is a helper function to stream results that possibly
157157
// contain non-fatal errors. The helper function is allowed to panic
158158
// on internal errors.
159-
func streamResults(procVal func(interface{}, io.Writer) nonFatalError) func(cmds.Response, cmds.ResponseEmitter) error {
159+
func streamResult(procVal func(interface{}, io.Writer) nonFatalError) func(cmds.Response, cmds.ResponseEmitter) error {
160160
return func(res cmds.Response, re cmds.ResponseEmitter) (err error) {
161161
defer func() {
162162
if r := recover(); r != nil {

core/commands/filestore.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ The output is:
7272
return res.Emit(out)
7373
},
7474
PostRun: cmds.PostRunMap{
75-
cmds.CLI: streamResults(func(v interface{}, out io.Writer) nonFatalError {
75+
cmds.CLI: streamResult(func(v interface{}, out io.Writer) nonFatalError {
7676
r := v.(*filestore.ListRes)
7777
if r.ErrorMsg != "" {
7878
return nonFatalError(r.ErrorMsg)

0 commit comments

Comments
 (0)