Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
func ClearOldFolder(folder string) {
doneCh := make(chan struct{})
defer close(doneCh)
for object := range StorageClient.ListObjectsV2(StaticBucket, "gaurav-test", true, doneCh) {
if object.Err != nil {
fmt.Println(object.Err)
return
}
fmt.Println(object.Key)
err := StorageClient.RemoveObject(StaticBucket,object.Key)
PanicIf(err)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.