code: func (s *fileStore) recover() error {
  	// If the 'current' file doesn't exist, continue on with the recovery process.
  	currentPath := filepath.Join(s.certDirectory, s.filename(currentPair))
  	if exists, err := fileExists(currentPath); err != nil {
  		return err
  	} else if exists {
  		return nil
  	}
  
  	// If the 'updated' file exists, and it is a symbolic link, continue on
  	// with the recovery process.
  	updatedPath := filepath.Join(s.certDirectory, s.filename(updatedPair))
  	if fi, err := os.Lstat(updatedPath); err != nil {
  		if os.IsNotExist(err) {
  			return nil
  		}
  		return err
  	} else if fi.Mode()&os.ModeSymlink != os.ModeSymlink {
  		return fmt.Errorf("expected %q to be a symlink but it is a file", updatedPath)
  	}
  
  	// Move the 'updated' symlink to 'current'.
  	if err := os.Rename(updatedPath, currentPath); err != nil {
  		return fmt.Errorf("unable to rename %q to %q: %v", updatedPath, currentPath, err)
  	}
  	return nil
  }
docs: // recover checks if there is a certificate rotation that was interrupted while
  // progress, and if so, attempts to recover to a good state.