code: func removeRegressionDB(dbPath string) error {
  	// Don't do anything if not in regression test mode.
  	if !cfg.RegressionTest {
  		return nil
  	}
  
  	// Remove the old regression test database if it already exists.
  	fi, err := os.Stat(dbPath)
  	if err == nil {
  		btcdLog.Infof("Removing regression test database from '%s'", dbPath)
  		if fi.IsDir() {
  			err := os.RemoveAll(dbPath)
  			if err != nil {
  				return err
  			}
  		} else {
  			err := os.Remove(dbPath)
  			if err != nil {
  				return err
  			}
  		}
  	}
  
  	return nil
  }
docs: // removeRegressionDB removes the existing regression test database if running
  // in regression test mode and it already exists.