You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In a similar vein to #13, is it possible to Run() multiple commands in a single session?
This fails with a panic on my system... a single command works just fine of course... single-command working copy, ref: route_views_go git hash 5e4bb51.
Doing this may require something similar to go-expect. Will goph support this functionality natively, or do I need a third-party library?
package main
import (
"fmt""github.com/gleich/logoru""github.com/melbahja/goph"
)
funcmain() {
// route-views username 'rviews' with no passwordclient01, err:=goph.New("rviews", "route-views.routeviews.org", goph.Password(""))
iferr!=nil {
logoru.Critical(err.Error())
}
deferclient01.Close()
// get the best BGP route info for 4.2.2.2cmdout01, err:=client01.Run(fmt.Sprintf("show ip bgp %s bestpath", "4.2.2.2"))
iferr!=nil {
logoru.Critical(err.Error())
}
// get the best BGP route info for 8.8.8.8cmdout02, err:=client01.Run(fmt.Sprintf("show ip bgp %s bestpath", "8.8.8.8"))
iferr!=nil {
logoru.Critical(err.Error())
}
logoru.Info(string(cmdout01))
logoru.Info(string(cmdout02))
}
The text was updated successfully, but these errors were encountered:
In a similar vein to #13, is it possible to
Run()
multiple commands in a single session?This fails with a panic on my system... a single command works just fine of course... single-command working copy, ref: route_views_go git hash
5e4bb51
.Doing this may require something similar to go-expect. Will goph support this functionality natively, or do I need a third-party library?
The text was updated successfully, but these errors were encountered: