17 lines
285 B
Go
17 lines
285 B
Go
package sshrpc
|
|
|
|
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)
|
|
}
|