Make ArchiveReader a struct

This commit is contained in:
Alexander Neumann
2017-03-02 15:45:35 +01:00
parent 9b776dc7ab
commit f53d33ba34
3 changed files with 47 additions and 9 deletions
+7 -1
View File
@@ -272,7 +272,13 @@ func readBackupFromStdin(opts BackupOptions, gopts GlobalOptions, args []string)
return err
}
_, id, err := archiver.ArchiveReader(repo, newArchiveStdinProgress(gopts), os.Stdin, opts.StdinFilename, opts.Tags, opts.Hostname)
r := &archiver.Reader{
Repository: repo,
Tags: opts.Tags,
Hostname: opts.Hostname,
}
_, id, err := r.Archive(opts.StdinFilename, os.Stdin, newArchiveStdinProgress(gopts))
if err != nil {
return err
}