1
1
Fork 0
mirror of https://github.com/mcuadros/ascode synced 2024-05-09 00:56:14 +02:00
ascode/cmd/common.go
Máximo Cuadros e1c229b80c *: project org change
Signed-off-by: Máximo Cuadros <mcuadros@gmail.com>
2019-08-01 20:43:59 +02:00

27 lines
495 B
Go

package cmd
import (
"io/ioutil"
"log"
"os"
"github.com/mcuadros/ascode/starlark/runtime"
"github.com/mcuadros/ascode/terraform"
)
func init() {
log.SetOutput(ioutil.Discard)
}
type commonCmd struct {
PluginDir string `long:"plugin-dir" description:"directory containing plugin binaries" default:"$HOME/.terraform.d/plugins"`
runtime *runtime.Runtime
}
func (c *commonCmd) init() {
c.runtime = runtime.NewRuntime(&terraform.PluginManager{
Path: os.ExpandEnv(c.PluginDir)},
)
}