Skip to content

Commit

Permalink
fix(s3): use MatchString to check if key starts with prefix
Browse files Browse the repository at this point in the history
  • Loading branch information
Daniel Dabrowski committed Jun 21, 2019
1 parent 69f8017 commit e1dab38
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion s3/objects.go
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ func ListObjects(svc s3iface.S3API, bucketName string, prefix string) ([]StoredO
Bucket: aws.String(bucketName),
}, func(p *s3.ListObjectsOutput, last bool) (shouldContinue bool) {
for _, obj := range p.Contents {
if prefixExpression.FindString(*obj.Key) != "" {
if prefixExpression.MatchString(*obj.Key) {
objects = append(objects, NewObject(*obj.Key))
}
}
Expand Down

0 comments on commit e1dab38

Please sign in to comment.