MCPcopy Create free account
hub / github.com/peak/s5cmd / processObjects

Method processObjects

command/cat.go:131–149  ·  view source on GitHub ↗
(ctx context.Context, client *storage.S3, objectChan <-chan *storage.Object)

Source from the content-addressed store, hash-verified

129}
130
131func (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
151func (c Cat) processSingleObject(ctx context.Context, client *storage.S3, url *url.URL) error {
152 buf := orderedwriter.New(os.Stdout)

Callers 1

RunMethod · 0.95

Calls 3

processSingleObjectMethod · 0.95
printErrorFunction · 0.85
IsDirMethod · 0.80

Tested by

no test coverage detected