Move code to different places, add comments here and there, no actual changes
This commit is contained in:
17
internal/backer/xz.go
Normal file
17
internal/backer/xz.go
Normal file
@@ -0,0 +1,17 @@
|
||||
package backer
|
||||
|
||||
import (
|
||||
"context"
|
||||
"io"
|
||||
|
||||
"github.com/ulikunitz/xz"
|
||||
)
|
||||
|
||||
// CreateTarXzStream takes a list of files and returns a reader that reads from an xz-compressed tar archive.
|
||||
func CreateTarXzStream(ctx context.Context, filepaths []string) io.ReadCloser {
|
||||
return createArchiveStream(ctx, filepaths, func(w io.Writer) (io.WriteCloser, error) {
|
||||
return xz.NewWriter(w)
|
||||
})
|
||||
}
|
||||
|
||||
/* vim: setlocal ft=go noet ai ts=4 sw=4 sts=4: */
|
||||
Reference in New Issue
Block a user