func (d *Dataset) Clone(dest string, properties map[string]string) (*Dataset, error) {
	if d.Type != DatasetSnapshot {
		return nil, errors.New("can only clone snapshots")
	}
	args := make([]string, 2, 4)
	args[0] = "clone"
	args[1] = "-p"
	if properties != nil {
		args = append(args, propsSlice(properties)...)
	}
	args = append(args, []string{d.Name, dest}...)
	_, err := zfs(args...)
	if err != nil {
		return nil, err
	}
	return GetDataset(dest)
}
func (d *Dataset) Clone(dest string, properties map[string]string) (*Dataset, error) {
	if d.Type != DatasetSnapshot {
		return nil, errors.New("can only clone snapshots")
	}
	args := make([]string, 2, 4)
	args[0] = "clone"
	args[1] = "-p"
	if properties != nil {
		args = append(args, propsSlice(properties)...)
	}
	args = append(args, []string{d.Name, dest}...)
	_, err := zfs(args...)
	if err != nil {
		return nil, err
	}
	return GetDataset(dest)
}
func ( d * Dataset ) Clone ( dest string , properties map [ string ] string ) ( * Dataset , error ) { if d . Type != DatasetSnapshot { return nil , errors . New ( " " ) } args := make ( [ ] string , 2 , 4 ) args [ 0 ] = " " args [ 1 ] = " " if properties != nil { args = append ( args , propsSlice ( properties ) ... ) } args = append ( args , [ ] string { d . Name , dest } ... ) _ , err := zfs ( args ... ) if err != nil { return nil , err } return GetDataset ( dest ) }
// Clone clones a ZFS snapshot and returns a clone dataset.
// An error will be returned if the input dataset is not of snapshot type.
Clone clones a ZFS snapshot and returns a clone dataset . An error will be returned if the input dataset is not of snapshot type .