1
1
mirror of https://github.com/mcuadros/ascode synced 2024-11-23 01:11:59 +01: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)},
)
}