func (t *Starlark) Init(tc transformertypes.Transformer, env *environment.Environment) (err error) {
	t.Config = tc
	t.Env = env
	t.StarConfig = StarYamlConfig{}
	err = common.GetObjFromInterface(t.Config.Spec.Config, &t.StarConfig)
	if err != nil {
		logrus.Errorf("unable to load config for Transformer %+v into %T : %s", t.Config.Spec.Config, t.StarConfig, err)
		return err
	}
	t.StarThread = &starlark.Thread{Name: tc.Name}
	t.setDefaultGlobals()
	tcmapobj, err := common.GetMapInterfaceFromObj(tc)
	if err != nil {
		logrus.Errorf("Unable to conver transformer config to map[string]interface{}")
		return err
	}
	t.StarGlobals[env.ProjectName], err = starutil.Marshal(env.ProjectName)
	if err != nil {
		logrus.Errorf("Unable to load transformer config : %s", err)
		return err
	}
	t.StarGlobals[transformerConfigVarName], err = starutil.Marshal(tcmapobj)
	if err != nil {
		logrus.Errorf("Unable to load transformer config : %s", err)
		return err
	}
	t.StarGlobals[contextDirVarName], err = starutil.Marshal(env.GetEnvironmentContext())
	if err != nil {
		logrus.Errorf("Unable to load context : %s", err)
		return err
	}
	t.StarGlobals[sourceDirVarName], err = starutil.Marshal(env.GetEnvironmentSource())
	if err != nil {
		logrus.Errorf("Unable to load source : %s", err)
		return err
	}
	t.StarGlobals[templatesRelDirVarName], err = starutil.Marshal(env.RelTemplatesDir)
	if err != nil {
		logrus.Errorf("Unable to load source : %s", err)
		return err
	}
	t.StarGlobals, err = starlark.ExecFile(t.StarThread, filepath.Join(t.Env.GetEnvironmentContext(), t.StarConfig.StarFile), nil, t.StarGlobals)
	if err != nil {
		logrus.Errorf("Unable to load starlark file %s : %s", filepath.Join(t.Env.GetEnvironmentContext(), t.StarConfig.StarFile), err)
		return err
	}
	err = t.loadFunctions()
	if err != nil {
		logrus.Errorf("Unable to load required functions : %s", err)
	}
	return err
}
Init Initializes the transformer
package external
import (
	"errors"
	"fmt"
	"io/fs"
	"io/ioutil"
	"os"
	"path/filepath"
	"strings"
	"github.com/konveyor/move2kube/common"
	"github.com/konveyor/move2kube/environment"
	"github.com/konveyor/move2kube/qaengine"
	"github.com/konveyor/move2kube/types"
	qatypes "github.com/konveyor/move2kube/types/qaengine"
	transformertypes "github.com/konveyor/move2kube/types/transformer"
	"github.com/qri-io/starlib"
	starutil "github.com/qri-io/starlib/util"
	"github.com/sirupsen/logrus"
	"go.starlark.net/starlark"
	"go.starlark.net/starlarkstruct"
)
const (
	baseDirectoryDetectFnName = "base_directory_detect"
	directoryDetectFnName     = "directory_detect"
	transformFnName           = "transform"
	sourceDirVarName         = "source_dir"
	contextDirVarName        = "context_dir"
	templatesRelDirVarName   = "templates_reldir"
	transformerConfigVarName = "config"
	projectVarName           = "project"
	qaFnName = "query"
	fsexistsFnName   = "exists"
	fsreadFnName     = "read"
	fsreaddirFnName  = "readdir"
	fspathjoinFnName = "pathjoin"
	fswriteFnName    = "write"
)
type Starlark struct {
	Config      transformertypes.Transformer
	StarConfig  StarYamlConfig
	StarThread  *starlark.Thread
	StarGlobals starlark.StringDict
	Env         *environment.Environment
	baseDetectFn *starlark.Function
	detectFn     *starlark.Function
	transformFn  *starlark.Function
}
type StarYamlConfig struct {
	StarFile string `yaml:"starFile"`
}