// Init prepares all sub-functionality of this gosh instance.
// If the returned error is not nil, this gosh must not be used until
// the issue is fixed.
Init prepares all sub-functionality of this gosh instance.
If the returned error is not nil, this gosh must not be used until
the issue is fixed.
// Init prepares all sub - functionality of this gosh instance . // If the returned error is not nil this gosh must not be used until // the issue is fixed .
func (g *Gosh) Init() error {
	var err error
	var term termios.Terminal
	term, err = termios.Open()
	if err != nil {
		return &InitError{err}
	}
	g.term = term
	g.prompt = NewPrompt(g)
	g.ready = true
	g.handler = event.NewEventHandler(g)
	return nil
}
func ( g * Gosh ) Init ( ) error { var err error var term termios . Terminal term , err = termios . Open ( ) if err != nil { return & InitError { err } } g . term = term g . prompt = NewPrompt ( g ) g . ready = true g . handler = event . NewEventHandler ( g ) return nil }
Init prepares all sub-functionality of this gosh instance.
Init prepares all sub - functionality of this gosh instance .