(ctx context.Context, client *storage.S3, objectChan <-chan *storage.Object)
| 129 | } |
| 130 | |
| 131 | func (c Cat) processObjects(ctx context.Context, client *storage.S3, objectChan <-chan *storage.Object) error { |
| 132 | for obj := range objectChan { |
| 133 | if obj.Err != nil { |
| 134 | printError(c.fullCommand, c.op, obj.Err) |
| 135 | return obj.Err |
| 136 | } |
| 137 | |
| 138 | if obj.Type.IsDir() { |
| 139 | continue |
| 140 | } |
| 141 | |
| 142 | err := c.processSingleObject(ctx, client, obj.URL) |
| 143 | if err != nil { |
| 144 | printError(c.fullCommand, c.op, err) |
| 145 | return err |
| 146 | } |
| 147 | } |
| 148 | return nil |
| 149 | } |
| 150 | |
| 151 | func (c Cat) processSingleObject(ctx context.Context, client *storage.S3, url *url.URL) error { |
| 152 | buf := orderedwriter.New(os.Stdout) |
no test coverage detected