File tree 1 file changed +4
-1
lines changed
1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -34,7 +34,8 @@ func NewArchive(inputReader io.Reader) Archive {
34
34
//
35
35
// Archive decompression will also handle files that are types "text/plain;
36
36
// charset=utf-8" and write the contents of the input stream to a file name
37
- // "artifact" in the destination directory.
37
+ // specified by the `Archive.WithName()` option (or defaults to "artifact")
38
+ // in the destination directory.
38
39
func (a Archive ) Decompress (destination string ) error {
39
40
// Convert reader into a buffered read so that the header can be peeked to
40
41
// determine the type.
@@ -83,6 +84,8 @@ func (a Archive) StripComponents(components int) Archive {
83
84
return a
84
85
}
85
86
87
+ // WithName provides a way of overriding the name of the file
88
+ // that the decompressed file will be copied into.
86
89
func (a Archive ) WithName (name string ) Archive {
87
90
a .name = name
88
91
return a
You can’t perform that action at this time.
0 commit comments