Skip to content

Commit

Permalink
#461: fix casting problem
Browse files Browse the repository at this point in the history
  • Loading branch information
Charlotte committed Jul 13, 2018
1 parent 772c076 commit 2cf1c60
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion cmd/dotmesh-server/transfers.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,16 @@ func s3TransferRequestify(in interface{}) (S3TransferRequest, error) {
"Unable to cast %s to map[string]interface{}", in,
)
}
prefixInter, ok := typed["Prefixes"].([]interface{})
var prefixes []string
for _, pref := range prefixInter {
prefixes = append(prefixes, pref.(string))
}
return S3TransferRequest{
KeyID: typed["KeyID"].(string),
SecretKey: typed["SecretKey"].(string),
Endpoint: typed["Endpoint"].(string),
Prefixes: typed["Prefixes"].([]string),
Prefixes: prefixes,
Direction: typed["Direction"].(string),
LocalNamespace: typed["LocalNamespace"].(string),
LocalName: typed["LocalName"].(string),
Expand Down

0 comments on commit 2cf1c60

Please sign in to comment.