(req dto.CommonRecover)
| 522 | } |
| 523 | |
| 524 | func newComposeRecoverContext(req dto.CommonRecover) (*composeRecoverContext, error) { |
| 525 | tmpDir := path.Join(path.Dir(req.File), strings.TrimSuffix(path.Base(req.File), ".tar.gz")) |
| 526 | ctx := &composeRecoverContext{ |
| 527 | req: req, |
| 528 | fileOp: files.NewFileOp(), |
| 529 | tmpDir: tmpDir, |
| 530 | meta: composeBackupMeta{ |
| 531 | Files: make([]composeBackupFile, 0), |
| 532 | Containers: make([]string, 0), |
| 533 | }, |
| 534 | } |
| 535 | return ctx, nil |
| 536 | } |
| 537 | |
| 538 | func (c *composeRecoverContext) close() { |
| 539 | if c.tmpDir != "" { |
no outgoing calls
no test coverage detected