mirror of
https://github.com/restic/restic.git
synced 2026-08-25 23:13:18 +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:
@@ -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