mirror of
https://github.com/restic/restic.git
synced 2026-10-11 12:37:13 +00:00
ui: Simplify stdio wrapper
The StdioWrapper type is really just a pair of io.WriteClosers, so remove it in favor of a function that returns two of those. Test coverage increases because the removed code was not tested.
This commit is contained in:
1 parent
7f439a9c34
commit
0b56214473
2 files changed
+5
-29
No files matched your search
@@ -31,8 +31,7 @@ func setupTermstatus() (*termstatus.Terminal, func()) {
|
||||
|
||||
// use the termstatus for stdout/stderr
|
||||
prevStdout, prevStderr := globalOptions.stdout, globalOptions.stderr
|
||||
stdioWrapper := ui.NewStdioWrapper(term)
|
||||
globalOptions.stdout, globalOptions.stderr = stdioWrapper.Stdout(), stdioWrapper.Stderr()
|
||||
globalOptions.stdout, globalOptions.stderr = ui.WrapStdio(term)
|
||||
|
||||
return term, func() {
|
||||
// shutdown termstatus
|
||||
|
||||
Reference in new issue
Block a user