func (txz *TarXz) Archive(sources []string, destination string) error {
	err := txz.CheckExt(destination)
	if err != nil {
		return fmt.Errorf("output %s", err.Error())
	}
	txz.wrapWriter()
	return txz.Tar.Archive(sources, destination)
}
Archive creates a compressed tar file at destination
containing the files listed in sources. The destination
must end with ".tar.xz" or ".txz". File paths can be
those of regular files or directories; directories will
be recursively added.
package archiver
import (
	"fmt"
	"io"
	"strings"
	"github.com/ulikunitz/xz"
	fastxz "github.com/xi2/xz"
)
type TarXz struct {
	*Tar
}
func (*TarXz) CheckExt(filename string) error {
	if !strings.HasSuffix(filename, ".tar.xz") &&
		!strings.HasSuffix(filename, ".txz") {
		return fmt.Errorf("filename must have a .tar.xz or .txz extension")
	}
	return nil
}