sshrpc/example_test.go

17 lines
285 B
Go
Raw Normal View History

package sshrpc
2015-05-30 17:25:21 +00:00
import "fmt"
func ExampleClient_Connect() {
client := NewClient()
client.Connect("localhost:2022")
defer client.Close()
var reply string
err := client.Call("ExampleServer.Hello", "Example Name", &reply)
if err != nil {
//Handle Error
}
fmt.Println(reply)
}