This reads the map and pumps it into the channel passed in, closing the channel at the end
(files map[string]fs.Object, out chan<- fs.Object)
| 300 | // This reads the map and pumps it into the channel passed in, closing |
| 301 | // the channel at the end |
| 302 | func (s *syncCopyMove) pumpMapToChan(files map[string]fs.Object, out chan<- fs.Object) { |
| 303 | outer: |
| 304 | for _, o := range files { |
| 305 | if s.aborting() { |
| 306 | break outer |
| 307 | } |
| 308 | select { |
| 309 | case out <- o: |
| 310 | case <-s.ctx.Done(): |
| 311 | break outer |
| 312 | } |
| 313 | } |
| 314 | close(out) |
| 315 | s.srcFilesResult <- nil |
| 316 | } |
| 317 | |
| 318 | // This checks the types of errors returned while copying files |
| 319 | func (s *syncCopyMove) processError(err error) { |
no test coverage detected