mirror of
https://github.com/restic/restic.git
synced 2024-12-23 00:07:25 +00:00
ui: Inline lineWriter into StdioWrapper
This commit is contained in:
parent
8898f61717
commit
7f439a9c34
1 changed files with 2 additions and 2 deletions
|
@ -37,14 +37,14 @@ func (w *StdioWrapper) Stderr() io.WriteCloser {
|
||||||
}
|
}
|
||||||
|
|
||||||
type lineWriter struct {
|
type lineWriter struct {
|
||||||
buf *bytes.Buffer
|
buf bytes.Buffer
|
||||||
print func(string)
|
print func(string)
|
||||||
}
|
}
|
||||||
|
|
||||||
var _ io.WriteCloser = &lineWriter{}
|
var _ io.WriteCloser = &lineWriter{}
|
||||||
|
|
||||||
func newLineWriter(print func(string)) *lineWriter {
|
func newLineWriter(print func(string)) *lineWriter {
|
||||||
return &lineWriter{buf: bytes.NewBuffer(nil), print: print}
|
return &lineWriter{print: print}
|
||||||
}
|
}
|
||||||
|
|
||||||
func (w *lineWriter) Write(data []byte) (n int, err error) {
|
func (w *lineWriter) Write(data []byte) (n int, err error) {
|
||||||
|
|
Loading…
Reference in a new issue