]> git.immae.eu Git - github/fretlink/terraform-provider-statuscake.git/blobdiff - vendor/github.com/hashicorp/terraform/terraform/ui_output_mock.go
deps: github.com/hashicorp/terraform@sdk-v0.11-with-go-modules
[github/fretlink/terraform-provider-statuscake.git] / vendor / github.com / hashicorp / terraform / terraform / ui_output_mock.go
index 7852bc4237fc35c32e67c2fb6eaa2099eb7efb63..d828c921ca3f3a6a53ecc22f3fdb837c6ac65e3d 100644 (file)
@@ -1,13 +1,18 @@
 package terraform
 
+import "sync"
+
 // MockUIOutput is an implementation of UIOutput that can be used for tests.
 type MockUIOutput struct {
+       sync.Mutex
        OutputCalled  bool
        OutputMessage string
        OutputFn      func(string)
 }
 
 func (o *MockUIOutput) Output(v string) {
+       o.Lock()
+       defer o.Unlock()
        o.OutputCalled = true
        o.OutputMessage = v
        if o.OutputFn != nil {