func Remove(path string) (bool, error) {
	var err error
	filepath := filepath.Join(path, GetDatabasePath())

	_, err = os.Stat(filepath)
	switch {
	case err == nil:
		log.Debugf("file %s exists\n", filepath)
		if err = os.Remove(filepath); err != nil {
			log.Errorf("error removing file: %v\n", err)
		}
		return true, err
	case os.IsNotExist(err):
		log.Debugf("file %s does not exist\n", filepath)
		return false, nil
	default:
		log.Errorf("error checking if file exists already: %v\n", err)
		return false, nil
	}
}
// Remove deletes any existing database, returning whether it was found and,
// if so, whether any error occurred along the way.
Remove deletes any existing database, returning whether it was found and,
if so, whether any error occurred along the way.
// Remove deletes any existing database returning whether it was found and // if so whether any error occurred along the way .
func Remove(path string) (bool, error) {
	var err error
	filepath := filepath.Join(path, GetDatabasePath())
	_, err = os.Stat(filepath)
	switch {
	case err == nil:
		log.Debugf("file %s exists\n", filepath)
		if err = os.Remove(filepath); err != nil {
			log.Errorf("error removing file: %v\n", err)
		}
		return true, err
	case os.IsNotExist(err):
		log.Debugf("file %s does not exist\n", filepath)
		return false, nil
	default:
		log.Errorf("error checking if file exists already: %v\n", err)
		return false, nil
	}
}
func Remove ( path string ) ( bool , error ) { var err error filepath := filepath . Join ( path , GetDatabasePath ( ) ) _ , err = os . Stat ( filepath ) switch { case err == nil : log . Debugf ( " \n " , filepath ) if err = os . Remove ( filepath ) ; err != nil { log . Errorf ( " \n " , err ) } return true , err case os . IsNotExist ( err ) : log . Debugf ( " \n " , filepath ) return false , nil default : log . Errorf ( " \n " , err ) return false , nil } }
Remove deletes any existing database, returning whether it was found and,
if so, whether any error occurred along the way.
Remove deletes any existing database returning whether it was found and if so whether any error occurred along the way .