Beispiel #1
0
func NewTerminal() (*Terminal, error) {
	eng, err := minterm.New()
	if err != nil {
		return nil, err
	}
	return &Terminal{engine: eng}, nil
}
Beispiel #2
0
func (t *Terminal) open() error {
	var err error
	t.once.Do(func() {
		if t.engine != nil {
			return
		}
		var eng *minterm.MinTerm
		eng, err = minterm.New()
		if err != nil {
			return
		}
		t.engine = eng
		return
	})
	return err
}