command: compilej:wq
This commit is contained in:
parent
76f5f1057e
commit
063e727491
|
@ -143,10 +143,6 @@ func (m *Meta) contextOpts() *terraform.ContextOpts {
|
|||
}
|
||||
opts.Variables = vs
|
||||
opts.UIInput = m.UIInput()
|
||||
opts.UIOutput = &UIOutput{
|
||||
Colorize: m.Colorize(),
|
||||
Ui: m.Ui,
|
||||
}
|
||||
|
||||
return &opts
|
||||
}
|
||||
|
|
|
@ -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}
|
||||
}
|
|
@ -1,11 +0,0 @@
|
|||
package command
|
||||
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/hashicorp/terraform/terraform"
|
||||
)
|
||||
|
||||
func TestUIOutput_impl(t *testing.T) {
|
||||
var _ terraform.UIOutput = new(UIOutput)
|
||||
}
|
Loading…
Reference in New Issue