command: set UIOutput

This commit is contained in:
Mitchell Hashimoto 2014-10-04 10:20:35 -07:00
parent 02d01141ca
commit 6d9463bfa8
3 changed files with 30 additions and 0 deletions

View File

@ -143,6 +143,10 @@ func (m *Meta) contextOpts() *terraform.ContextOpts {
}
opts.Variables = vs
opts.UIInput = m.UIInput()
opts.UIOutput = &UIOutput{
Colorize: m.Colorize(),
Ui: m.Ui,
}
return &opts
}

15
command/ui_output.go Normal file
View File

@ -0,0 +1,15 @@
package command
import (
"github.com/mitchellh/cli"
"github.com/mitchellh/colorstring"
)
// UIOutput is an implementation of terraform.UIOutput.
type UIOutput struct {
Colorize *colorstring.Colorize
Ui cli.Ui
}
func (u *UIOutput) Output(v string) {
}

11
command/ui_output_test.go Normal file
View File

@ -0,0 +1,11 @@
package command
import (
"testing"
"github.com/hashicorp/terraform/terraform"
)
func TestUIOutput_impl(t *testing.T) {
var _ terraform.UIOutput = new(UIOutput)
}