// Connect loads the transformer file and initializes the transformer environment
Connect loads the transformer file and initializes the transformer environment
// Connect loads the transformer file and initializes the transformer environment
func (t *Transformer) Connect() error {
	if t.filename == "" {
		return fmt.Errorf("no filename specified")
	}
	ba, err := ioutil.ReadFile(t.filename)
	if err != nil {
		return err
	}
	t.fn = string(ba)
	if err = t.initEnvironment(); err != nil {
		return err
	}
	return nil
}
func ( t * Transformer ) Connect ( ) error { if t . filename == " " { return fmt . Errorf ( " " ) } ba , err := ioutil . ReadFile ( t . filename ) if err != nil { return err } t . fn = string ( ba ) if err = t . initEnvironment ( ) ; err != nil { return err } return nil }
Connect loads the transformer file and initializes the transformer environment
Connect loads the transformer file and initializes the transformer environment