func (r *Registry) Clear() error {
	r.lock.Lock()
	defer r.lock.Unlock()

	rpath, err := r.ensurePath()
	if err != nil {
		return err
	}

	err = os.Remove(rpath)
	if os.IsNotExist(err) {
		return nil
	}

	return err
}
// Clear clears the registry unconditionally
Clear clears the registry unconditionally
// Clear clears the registry unconditionally
func (r *Registry) Clear() error {
	r.lock.Lock()
	defer r.lock.Unlock()
	rpath, err := r.ensurePath()
	if err != nil {
		return err
	}
	err = os.Remove(rpath)
	if os.IsNotExist(err) {
		return nil
	}
	return err
}
func ( r * Registry ) Clear ( ) error { r . lock . Lock ( ) defer r . lock . Unlock ( ) rpath , err := r . ensurePath ( ) if err != nil { return err } err = os . Remove ( rpath ) if os . IsNotExist ( err ) { return nil } return err }
Clear clears the registry unconditionally
Clear clears the registry unconditionally