aboutsummaryrefslogtreecommitdiffhomepage
path: root/vendor/github.com/mitchellh/cli/ui_writer.go
diff options
context:
space:
mode:
authorAlex Pilon <apilon@hashicorp.com>2019-02-22 18:24:37 -0500
committerAlex Pilon <apilon@hashicorp.com>2019-02-22 18:24:37 -0500
commit15c0b25d011f37e7c20aeca9eaf461f78285b8d9 (patch)
tree255c250a5c9d4801c74092d33b7337d8c14438ff /vendor/github.com/mitchellh/cli/ui_writer.go
parent07971ca38143c5faf951d152fba370ddcbe26ad5 (diff)
downloadterraform-provider-statuscake-15c0b25d011f37e7c20aeca9eaf461f78285b8d9.tar.gz
terraform-provider-statuscake-15c0b25d011f37e7c20aeca9eaf461f78285b8d9.tar.zst
terraform-provider-statuscake-15c0b25d011f37e7c20aeca9eaf461f78285b8d9.zip
deps: github.com/hashicorp/terraform@sdk-v0.11-with-go-modules
Updated via: go get github.com/hashicorp/terraform@sdk-v0.11-with-go-modules and go mod tidy
Diffstat (limited to 'vendor/github.com/mitchellh/cli/ui_writer.go')
-rw-r--r--vendor/github.com/mitchellh/cli/ui_writer.go18
1 files changed, 18 insertions, 0 deletions
diff --git a/vendor/github.com/mitchellh/cli/ui_writer.go b/vendor/github.com/mitchellh/cli/ui_writer.go
new file mode 100644
index 0000000..1e1db3c
--- /dev/null
+++ b/vendor/github.com/mitchellh/cli/ui_writer.go
@@ -0,0 +1,18 @@
1package cli
2
3// UiWriter is an io.Writer implementation that can be used with
4// loggers that writes every line of log output data to a Ui at the
5// Info level.
6type UiWriter struct {
7 Ui Ui
8}
9
10func (w *UiWriter) Write(p []byte) (n int, err error) {
11 n = len(p)
12 if n > 0 && p[n-1] == '\n' {
13 p = p[:n-1]
14 }
15
16 w.Ui.Info(string(p))
17 return n, nil
18}