Use default endpoint when not supplied

This commit is contained in:
Remco Verhoef 2017-05-08 12:45:19 -07:00 committed by Harshavardhana
parent 6508da5fde
commit 909a89647b

View File

@ -162,7 +162,11 @@ func newGCSGateway(endpoint string, projectID, secretKey string, secure bool) (G
return nil, err
}
anonClient, err := minio.NewCore("storage.googleapis.com", "", "", secure)
if endpoint == "" {
endpoint = "storage.googleapis.com"
}
anonClient, err := minio.NewCore(endpoint, "", "", secure)
if err != nil {
return nil, err
}