func()

in internal/remote/remote.go [168:180]


func (r *remote) CreateSession(input string) (SSHSessionInterface, error) {
	if r.client == nil {
		return nil, fmt.Errorf("no client created. please make sure CreateClient() is called before calling CreateSession()")
	}
	session, err := r.client.NewSession()
	if err != nil {
		return nil, err
	}
	if input != "" {
		session.Stdin = bytes.NewBufferString(input)
	}
	return session, nil
}