(compressType CompressType)
| 12 | } |
| 13 | |
| 14 | func NewTarArchiver(compressType CompressType) ShellArchiver { |
| 15 | return &TarArchiver{ |
| 16 | Cmd: "tar", |
| 17 | CompressType: compressType, |
| 18 | } |
| 19 | } |
| 20 | |
| 21 | func (t TarArchiver) Extract(ctx context.Context, FilePath string, dstDir string, secret string) error { |
| 22 | return cmd.NewCommandMgr(cmd.WithContext(ctx)).Run(t.Cmd, t.getOptionStr("extract"), FilePath, "-C", dstDir) |
no outgoing calls
no test coverage detected