code: func parseMetadata(r io.Reader) (*Metadata, error) {
  	var metadata Metadata
  	json := json.NewDecoder(r)
  	if err := json.Decode(&metadata); err != nil {
  		return nil, err
  	}
  
  	if metadata.UUID == "" {
  		return nil, ErrBadMetadata
  	}
  
  	return &metadata, nil
  }
docs: // parseMetadata reads JSON from OpenStack metadata server and parses
  // instance ID out of it.