MCPcopy
hub / github.com/minio/minio-go / getDefaultLocation

Function getDefaultLocation

utils.go:500–509  ·  view source on GitHub ↗

Get default location returns the location based on the input URL `u`, if region override is provided then all location defaults to regionOverride. If no other cases match then the location is set to `us-east-1` as a last resort.

(u url.URL, regionOverride string)

Source from the content-addressed store, hash-verified

498// If no other cases match then the location is set to `us-east-1`
499// as a last resort.
500func getDefaultLocation(u url.URL, regionOverride string) (location string) {
501 if regionOverride != "" {
502 return regionOverride
503 }
504 region := s3utils.GetRegionFromURL(u)
505 if region == "" {
506 region = "us-east-1"
507 }
508 return region
509}
510
511var supportedHeaders = map[string]bool{
512 "content-type": true,

Callers 3

newRequestMethod · 0.85

Calls 1

GetRegionFromURLFunction · 0.92

Tested by 1