func (d *Dataset) Destroy(flags DestroyFlag) error {
	args := make([]string, 1, 3)
	args[0] = "destroy"
	if flags&DestroyRecursive != 0 {
		args = append(args, "-r")
	}

	if flags&DestroyRecursiveClones != 0 {
		args = append(args, "-R")
	}

	if flags&DestroyDeferDeletion != 0 {
		args = append(args, "-d")
	}

	if flags&DestroyForceUmount != 0 {
		args = append(args, "-f")
	}

	args = append(args, d.Name)
	_, err := zfs(args...)
	return err
}
func (d *Dataset) Destroy(flags DestroyFlag) error {
	args := make([]string, 1, 3)
	args[0] = "destroy"
	if flags&DestroyRecursive != 0 {
		args = append(args, "-r")
	}

	if flags&DestroyRecursiveClones != 0 {
		args = append(args, "-R")
	}

	if flags&DestroyDeferDeletion != 0 {
		args = append(args, "-d")
	}

	if flags&DestroyForceUmount != 0 {
		args = append(args, "-f")
	}

	args = append(args, d.Name)
	_, err := zfs(args...)
	return err
}
func ( d * Dataset ) Destroy ( flags DestroyFlag ) error { args := make ( [ ] string , 1 , 3 ) args [ 0 ] = " " if flags & DestroyRecursive != 0 { args = append ( args , " " ) } if flags & DestroyRecursiveClones != 0 { args = append ( args , " " ) } if flags & DestroyDeferDeletion != 0 { args = append ( args , " " ) } if flags & DestroyForceUmount != 0 { args = append ( args , " " ) } args = append ( args , d . Name ) _ , err := zfs ( args ... ) return err }
// Destroy destroys a ZFS dataset. If the destroy bit flag is set, any
// descendents of the dataset will be recursively destroyed, including snapshots.
// If the deferred bit flag is set, the snapshot is marked for deferred
// deletion.
Destroy destroys a ZFS dataset . If the destroy bit flag is set any descendents of the dataset will be recursively destroyed including snapshots . If the deferred bit flag is set the snapshot is marked for deferred deletion .