Cleanup internal packages

This commit is contained in:
Tom Wiesing 2022-09-11 17:12:57 +02:00
parent 86a4334796
commit abafab9f0a
No known key found for this signature in database
7 changed files with 93 additions and 145 deletions

View file

@ -1,3 +1,4 @@
// Package targz provides facilities for packaging tar.gz files
package targz
import (
@ -9,7 +10,9 @@ import (
"path/filepath"
)
// Package packages the directory src into dst.
// Package packages the source directory into a 'tar.gz' file into destination.
// If the destination already exists, it is truncated.
//
// onCopy, when not nil, is called for each file being copied into the archive.
func Package(dst, src string, onCopy func(rel string, src string)) (count int64, err error) {
// create the target archive