Bläddra i källkod

Merge pull request #5853 from proppy/update-tarfilter-comment

archive: update TarFilter comments
Victor Vieux 11 år sedan
förälder
incheckning
1adc2fa533
1 ändrade filer med 5 tillägg och 2 borttagningar
  1. 5 2
      archive/archive.go

+ 5 - 2
archive/archive.go

@@ -303,8 +303,11 @@ func escapeName(name string) string {
 	return string(escaped)
 }
 
-// Tar creates an archive from the directory at `path`, only including files whose relative
-// paths are included in `filter`. If `filter` is nil, then all files are included.
+// TarFilter creates an archive from the directory at `srcPath` with `options`, and returns it as a
+// stream of bytes.
+//
+// Files are included according to `options.Includes`, default to including all files.
+// Stream is compressed according to `options.Compression', default to Uncompressed.
 func TarFilter(srcPath string, options *TarOptions) (io.ReadCloser, error) {
 	pipeReader, pipeWriter := io.Pipe()