title: Delete objects in s3 using wildcard matching
body: <p>I have the following working code to delete an object from Amazon s3 </p>
  
  <pre><code>params := &amp;s3.DeleteObjectInput{
          Bucket: aws.String("Bucketname"),
          Key : aws.String("ObjectKey"),
      }
  s3Conn.DeleteObjects(params)
  </code></pre>
  
  <p>But what i want to do is to delete all files under a folder using wildcard **. I know amazon s3 doesn't treat "x/y/file.jpg" as a folder y inside x but what i want to achieve is by mentioning "x/y*" delete all the subsequent objects having the same prefix. Tried <a href="http://aws.amazon.com/s3/faqs/#How_can_I_delete_large_numbers_of_objects" rel="noreferrer">amazon multi object delete</a> </p>
  
  <pre><code>params := &amp;s3.DeleteObjectsInput{
          Bucket: aws.String("BucketName"),
          Delete: &amp;s3.Delete{
              Objects: []*s3.ObjectIdentifier {
                  {
                      Key : aws.String("x/y/.*"), 
                  },
              },
          },
      }
      result , err := s3Conn.DeleteObjects(params)
  </code></pre>
  
  <p>I know in php it can be done easily by <em>s3->delete_all_objects</em> as per <a href="https://stackoverflow.com/questions/9054287/delete-from-s3-using-api-php-using-wildcard">this answer</a>. Is the same action possible in GOlang.</p>