func PublicCloudMetadata(searchPath ...string) (result map[string]Cloud, fallbackUsed bool, err error) {
	for _, file := range searchPath {
		data, err := ioutil.ReadFile(file)
		if err != nil && os.IsNotExist(err) {
			continue
		}
		if err != nil {
			return nil, false, errors.Trace(err)
		}
		clouds, err := ParseCloudMetadata(data)
		if err != nil {
			return nil, false, errors.Trace(err)
		}
		return clouds, false, err
	}
	clouds, err := ParseCloudMetadata([]byte(fallbackPublicCloudInfo))
	return clouds, true, err
}
// PublicCloudMetadata looks in searchPath for cloud metadata files and if none
// are found, returns the fallback public cloud metadata.
PublicCloudMetadata looks in searchPath for cloud metadata files and if none
are found, returns the fallback public cloud metadata.
// PublicCloudMetadata looks in searchPath for cloud metadata files and if none // are found returns the fallback public cloud metadata .
func PublicCloudMetadata(searchPath ...string) (result map[string]Cloud, fallbackUsed bool, err error) {
	for _, file := range searchPath {
		data, err := ioutil.ReadFile(file)
		if err != nil && os.IsNotExist(err) {
			continue
		}
		if err != nil {
			return nil, false, errors.Trace(err)
		}
		clouds, err := ParseCloudMetadata(data)
		if err != nil {
			return nil, false, errors.Trace(err)
		}
		return clouds, false, err
	}
	clouds, err := ParseCloudMetadata([]byte(fallbackPublicCloudInfo))
	return clouds, true, err
}
func PublicCloudMetadata ( searchPath ... string ) ( result map [ string ] Cloud , fallbackUsed bool , err error ) { for _ , file := range searchPath { data , err := ioutil . ReadFile ( file ) if err != nil && os . IsNotExist ( err ) { continue } if err != nil { return nil , false , errors . Trace ( err ) } clouds , err := ParseCloudMetadata ( data ) if err != nil { return nil , false , errors . Trace ( err ) } return clouds , false , err } clouds , err := ParseCloudMetadata ( [ ] byte ( fallbackPublicCloudInfo ) ) return clouds , true , err }
PublicCloudMetadata looks in searchPath for cloud metadata files and if none
are found, returns the fallback public cloud metadata.
PublicCloudMetadata looks in searchPath for cloud metadata files and if none are found returns the fallback public cloud metadata .