vaguerent/builtin/myplugin/host/cap/write_hello.go
2022-04-25 12:24:48 -05:00

23 lines
466 B
Go

package cap
import (
"os"
"github.com/hashicorp/vagrant-plugin-sdk/terminal"
)
func WriteHello(ui terminal.UI) error {
msg := "Hello from the write hello capability, compliments of the AlwaysTrue Host"
ui.Output(msg)
return nil
}
func WriteHelloToTempfile() error {
msg := []byte("Hello from the write hello capability, compliments of the AlwaysTrue Host")
err := os.WriteFile("/tmp/write_hello", msg, 0644)
if err != nil {
panic(err)
}
return nil
}