command: compilej:wq

This commit is contained in:
Mitchell Hashimoto 2014-10-04 16:24:57 -07:00
parent 76f5f1057e
commit 063e727491
3 changed files with 0 additions and 43 deletions

View File

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

View File

@ -1,28 +0,0 @@
package command
import (
"sync"
"github.com/mitchellh/cli"
"github.com/mitchellh/colorstring"
)
// UIOutput is an implementation of terraform.UIOutput.
type UIOutput struct {
Colorize *colorstring.Colorize
Ui cli.Ui
once sync.Once
ui cli.Ui
}
func (u *UIOutput) Output(v string) {
u.once.Do(u.init)
u.ui.Output(v)
}
func (u *UIOutput) init() {
// Wrap the ui so that it is safe for concurrency regardless of the
// underlying reader/writer that is in place.
u.ui = &cli.ConcurrentUi{Ui: u.Ui}
}

View File

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