List objects recursively
This commit is contained in:
parent
86ea7a2a2a
commit
a9a88552d7
2 changed files with 2 additions and 3 deletions
3
main.go
3
main.go
|
@ -15,8 +15,7 @@ import (
|
||||||
|
|
||||||
func main() {
|
func main() {
|
||||||
s3 := datasources.NewMinioClient()
|
s3 := datasources.NewMinioClient()
|
||||||
|
logger := log.New(os.Stdout, "", log.Ldate|log.Ltime)
|
||||||
logger := log.New(os.Stdout, "request: ", log.Lshortfile)
|
|
||||||
router := mux.NewRouter()
|
router := mux.NewRouter()
|
||||||
|
|
||||||
router.
|
router.
|
||||||
|
|
|
@ -34,7 +34,7 @@ func BucketHandler(s3 *minio.Client) http.Handler {
|
||||||
}
|
}
|
||||||
|
|
||||||
doneCh := make(chan struct{})
|
doneCh := make(chan struct{})
|
||||||
objectCh := s3.ListObjectsV2(bucketName, "", false, doneCh)
|
objectCh := s3.ListObjectsV2(bucketName, "", true, doneCh)
|
||||||
for object := range objectCh {
|
for object := range objectCh {
|
||||||
if object.Err != nil {
|
if object.Err != nil {
|
||||||
msg := "error listing objects"
|
msg := "error listing objects"
|
||||||
|
|
Loading…
Reference in a new issue