Skip to content

Commit b8343e0

Browse files
committed
AsChan -> ToChan
License: MIT Signed-off-by: Kevin Atkinson <[email protected]>
1 parent c58d69d commit b8343e0

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

core/commands/filestore.go

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ The output is:
5252
}
5353
args := req.Arguments()
5454
if len(args) > 0 {
55-
out := perKeyActionAsChan(args, func(c *cid.Cid) *filestore.ListRes {
55+
out := perKeyActionToChan(args, func(c *cid.Cid) *filestore.ListRes {
5656
return filestore.List(fs, c)
5757
}, req.Context())
5858
res.SetOutput(out)
@@ -62,7 +62,7 @@ The output is:
6262
res.SetError(err, cmds.ErrNormal)
6363
return
6464
}
65-
out := listResAsChan(next, req.Context())
65+
out := listResToChan(next, req.Context())
6666
res.SetOutput(out)
6767
}
6868
},
@@ -128,7 +128,7 @@ For ERROR entries the error will also be printed to stderr.
128128
}
129129
args := req.Arguments()
130130
if len(args) > 0 {
131-
out := perKeyActionAsChan(args, func(c *cid.Cid) *filestore.ListRes {
131+
out := perKeyActionToChan(args, func(c *cid.Cid) *filestore.ListRes {
132132
return filestore.Verify(fs, c)
133133
}, req.Context())
134134
res.SetOutput(out)
@@ -138,7 +138,7 @@ For ERROR entries the error will also be printed to stderr.
138138
res.SetError(err, cmds.ErrNormal)
139139
return
140140
}
141-
out := listResAsChan(next, req.Context())
141+
out := listResToChan(next, req.Context())
142142
res.SetOutput(out)
143143
}
144144
},
@@ -175,7 +175,7 @@ func getFilestore(req cmds.Request) (*core.IpfsNode, *filestore.Filestore, error
175175
return n, fs, err
176176
}
177177

178-
func listResAsChan(next func() *filestore.ListRes, ctx context.Context) <-chan interface{} {
178+
func listResToChan(next func() *filestore.ListRes, ctx context.Context) <-chan interface{} {
179179
out := make(chan interface{}, 128)
180180
go func() {
181181
defer close(out)
@@ -194,7 +194,7 @@ func listResAsChan(next func() *filestore.ListRes, ctx context.Context) <-chan i
194194
return out
195195
}
196196

197-
func perKeyActionAsChan(args []string, action func(*cid.Cid) *filestore.ListRes, ctx context.Context) <-chan interface{} {
197+
func perKeyActionToChan(args []string, action func(*cid.Cid) *filestore.ListRes, ctx context.Context) <-chan interface{} {
198198
out := make(chan interface{}, 128)
199199
go func() {
200200
defer close(out)

0 commit comments

Comments
 (0)