mirror of
https://github.com/octoleo/restic.git
synced 2024-11-23 13:17:42 +00:00
ui: Inline lineWriter into StdioWrapper
This commit is contained in:
parent
8898f61717
commit
7f439a9c34
@ -37,14 +37,14 @@ func (w *StdioWrapper) Stderr() io.WriteCloser {
|
||||
}
|
||||
|
||||
type lineWriter struct {
|
||||
buf *bytes.Buffer
|
||||
buf bytes.Buffer
|
||||
print func(string)
|
||||
}
|
||||
|
||||
var _ io.WriteCloser = &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) {
|
||||
|
Loading…
Reference in New Issue
Block a user