config/yaml_config.go
func (m *yamlManager) DeleteConfigIfExists() error {
	if !FileOrDirectoryExists(m.ConfigDir) {
		lo.G.Infof("%s doesn't exists, nothing to delete", m.ConfigDir)
		return nil
	}
	if err := os.RemoveAll(m.ConfigDir); err != nil {
		lo.G.Errorf("Error deleting config folder. Error: %s", err)
		return fmt.Errorf("cannot delete %s: %v", m.ConfigDir, err)
	}
	lo.G.Info("Config directory deleted")
	return nil
}
func (m *yamlManager) DeleteConfigIfExists() error {
	if !FileOrDirectoryExists(m.ConfigDir) {
		lo.G.Infof("%s doesn't exists, nothing to delete", m.ConfigDir)
		return nil
	}
	if err := os.RemoveAll(m.ConfigDir); err != nil {
		lo.G.Errorf("Error deleting config folder. Error: %s", err)
		return fmt.Errorf("cannot delete %s: %v", m.ConfigDir, err)
	}
	lo.G.Info("Config directory deleted")
	return nil
}
func ( m * yamlManager ) DeleteConfigIfExists ( ) error { if ! FileOrDirectoryExists ( m . ConfigDir ) { lo . G . Infof ( " " , m . ConfigDir ) return nil } if err := os . RemoveAll ( m . ConfigDir ) ; err != nil { lo . G . Errorf ( " " , err ) return fmt . Errorf ( " " , m . ConfigDir , err ) } lo . G . Info ( " " ) return nil }
// DeleteConfigIfExists deletes config directory if it exists.
DeleteConfigIfExists deletes config directory if it exists .