@@ -107,8 +107,7 @@ type Options struct {
107107}
108108
109109type Backend struct {
110- opt Options
111- // config *minio.Options
110+ opt Options
112111 client * azblob.Client
113112 log logr.Logger
114113 markerName string
@@ -301,7 +300,6 @@ func (b *Backend) doList(ctx context.Context, prefix string) (simpleblob.BlobLis
301300
302301 // Runes to strip from blob names for GlobalPrefix
303302 // This is fine, because we can trust the API to only return with the prefix.
304- // TODO: trust but verify
305303 gpEndIndex := len (b .opt .GlobalPrefix )
306304
307305 // Use Azure SDK to get blobs from container
@@ -321,8 +319,6 @@ func (b *Backend) doList(ctx context.Context, prefix string) (simpleblob.BlobLis
321319 }
322320
323321 for _ , v := range resp .Segment .BlobItems {
324- // fmt.Printf("Filename: %s \n", *v.Name)
325-
326322 blobName := * v .Name
327323
328324 // We have to manually check for prefix since Azure doesn't support querying by prefix
@@ -344,8 +340,7 @@ func (b *Backend) doList(ctx context.Context, prefix string) (simpleblob.BlobLis
344340 }
345341 }
346342
347- // Minio appears to return them sorted, but maybe not all implementations
348- // will, so we sort explicitly.
343+ // Sort explicitly.
349344 sort .Sort (blobs )
350345
351346 return blobs , nil
@@ -385,20 +380,6 @@ func (b *Backend) doLoadReader(ctx context.Context, name string) (io.ReadCloser,
385380 // Convert the response body to a Reader
386381 reader := io .Reader (blobDownloadResponse .Body )
387382
388- // @TODO do we need to intercept?
389- // if obj == nil {
390- // return nil, os.ErrNotExist
391- // }
392- // info, err := obj.Stat()
393- // if err = convertMinioError(err, false); err != nil {
394- // metricCallErrors.WithLabelValues("load").Inc()
395- // return nil, err
396- // }
397- // if info.Key == "" {
398- // // minio will return an object with empty fields when name
399- // // is not present in bucket.
400- // return nil, os.ErrNotExist
401- // }
402383 return io .NopCloser (reader ), nil
403384}
404385
0 commit comments