mirror of
https://github.com/restic/restic.git
synced 2025-10-09 15:30:24 +00:00
ui, termstatus: Move WrapStdio
Saves some imports. ui still needs to import ui/termstatus from message.go.
This commit is contained in:
@@ -1,15 +1,13 @@
|
||||
package ui
|
||||
package termstatus
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
"io"
|
||||
|
||||
"github.com/restic/restic/internal/ui/termstatus"
|
||||
)
|
||||
|
||||
// WrapStdio returns line-buffering replacements for os.Stdout and os.Stderr.
|
||||
// On Close, the remaining bytes are written, followed by a line break.
|
||||
func WrapStdio(term *termstatus.Terminal) (stdout, stderr io.WriteCloser) {
|
||||
func WrapStdio(term *Terminal) (stdout, stderr io.WriteCloser) {
|
||||
return newLineWriter(term.Print), newLineWriter(term.Error)
|
||||
}
|
||||
|
@@ -1,4 +1,4 @@
|
||||
package ui
|
||||
package termstatus
|
||||
|
||||
import (
|
||||
"strings"
|
Reference in New Issue
Block a user