Code cleanup - simplify server side code. (#3870)

Fix all the issues reported by `gosimple` tool.
This commit is contained in:
Harshavardhana
2017-03-08 10:00:47 -08:00
committed by GitHub
parent 433225ab0d
commit 47ac410ab0
14 changed files with 21 additions and 52 deletions
+1 -4
View File
@@ -86,10 +86,7 @@ func isBucketActionAllowed(action, bucket, prefix string) bool {
resource := bucketARNPrefix + path.Join(bucket, prefix)
var conditionKeyMap map[string]set.StringSet
// Validate action, resource and conditions with current policy statements.
if !bucketPolicyEvalStatements(action, resource, conditionKeyMap, policy.Statements) {
return false
}
return true
return bucketPolicyEvalStatements(action, resource, conditionKeyMap, policy.Statements)
}
// GetBucketLocationHandler - GET Bucket location.