Vendor temporarily
This commit is contained in:
1 parent
dd8e532d18
commit
1c02ed9115
4708 files changed
+1226392
-12
No files matched your search
+18
@@ -0,0 +1,18 @@
|
||||
package cli
|
||||
|
||||
// UiWriter is an io.Writer implementation that can be used with
|
||||
// loggers that writes every line of log output data to a Ui at the
|
||||
// Info level.
|
||||
type UiWriter struct {
|
||||
Ui Ui
|
||||
}
|
||||
|
||||
func (w *UiWriter) Write(p []byte) (n int, err error) {
|
||||
n = len(p)
|
||||
if n > 0 && p[n-1] == '\n' {
|
||||
p = p[:n-1]
|
||||
}
|
||||
|
||||
w.Ui.Info(string(p))
|
||||
return n, nil
|
||||
}
|
||||
Reference in new issue
Block a user