func GetApplicationMetadata(upstream *url.URL) ([]byte, error) {
	metadata, err := getApplicationMetadataFromHost("replicated.app", upstream)
	if err != nil {
		return nil, errors.Wrap(err, "failed to get metadata from replicated.app")
	}

	if metadata == nil {
		otherMetadata, err := getApplicationMetadataFromHost("staging.replicated.app", upstream)
		if err != nil {
			return nil, errors.Wrap(err, "failed to get metadata from staging.replicated.app")
		}

		metadata = otherMetadata
	}

	if metadata == nil {
		metadata = []byte(DefaultMetadata)
	}

	return metadata, nil
}
// GetApplicationMetadata will return any available application yaml from
// the upstream. If there is no application.yaml, it will return
// a placeholder one
GetApplicationMetadata will return any available application yaml from
the upstream. If there is no application.yaml, it will return
a placeholder one
// GetApplicationMetadata will return any available application yaml from // the upstream . If there is no application . yaml it will return // a placeholder one
func GetApplicationMetadata(upstream *url.URL) ([]byte, error) {
	metadata, err := getApplicationMetadataFromHost("replicated.app", upstream)
	if err != nil {
		return nil, errors.Wrap(err, "failed to get metadata from replicated.app")
	}
	if metadata == nil {
		otherMetadata, err := getApplicationMetadataFromHost("staging.replicated.app", upstream)
		if err != nil {
			return nil, errors.Wrap(err, "failed to get metadata from staging.replicated.app")
		}
		metadata = otherMetadata
	}
	if metadata == nil {
		metadata = []byte(DefaultMetadata)
	}
	return metadata, nil
}
func GetApplicationMetadata ( upstream * url . URL ) ( [ ] byte , error ) { metadata , err := getApplicationMetadataFromHost ( " " , upstream ) if err != nil { return nil , errors . Wrap ( err , " " ) } if metadata == nil { otherMetadata , err := getApplicationMetadataFromHost ( " " , upstream ) if err != nil { return nil , errors . Wrap ( err , " " ) } metadata = otherMetadata } if metadata == nil { metadata = [ ] byte ( DefaultMetadata ) } return metadata , nil }
GetApplicationMetadata will return any available application yaml from
the upstream.
GetApplicationMetadata will return any available application yaml from the upstream .