code: func (m *Main) readID(path string) (string, error) {
  	buf, err := ioutil.ReadFile(path)
  	if err != nil && !os.IsNotExist(err) {
  		return "", fmt.Errorf("error reading instance ID: %s", err)
  	}
  
  	// If the ID exists then return it immediately.
  	id := string(buf)
  	if id != "" {
  		return id, nil
  	}
  
  	// Generate a new ID and write it to file.
  	id = random.UUID()
  	if err := ioutil.WriteFile(path, []byte(id), 0644); err != nil {
  		return "", fmt.Errorf("error writing instance ID: %s", err)
  	}
  	return id, nil
  }
docs: // readID reads the instance id from path.
  // If the file instance id doesn't exist then a random ID is generated.