code: func (c *EC2Metadata) Available() bool {
  	if _, err := c.GetMetadata("instance-id"); err != nil {
  		return false
  	}
  
  	return true
  }
docs: // Available returns if the application has access to the EC2 Metadata service.
  // Can be used to determine if application is running within an EC2 Instance and
  // the metadata service is available.