code: func GetLocationByName(sess *session.Session, name string, args ...interface{}) (datatypes.Location, error) {
  	var mask string
  	if len(args) > 0 {
  		mask = args[0].(string)
  	}
  
  	locs, err := services.GetLocationService(sess).
  		Mask(mask).
  		Filter(filter.New(filter.Path("name").Eq(name)).Build()).
  		GetDatacenters()
  
  	if err != nil {
  		return datatypes.Location{}, err
  	}
  
  	// An empty filtered result set does not raise an error
  	if len(locs) == 0 {
  		return datatypes.Location{}, fmt.Errorf("No locations found with name of %s", name)
  	}
  
  	return locs[0], nil
  }
docs: // GetLocationByName returns a Location that matches the provided name, or an
  // error if no matching Location can be found.
  //
  // If you need to access a datacenter's unique properties, use
  // GetDatacenterByName instead