mirror of
https://github.com/fluencelabs/tendermint
synced 2025-06-13 05:11:21 +00:00
docs: add client#Start/Stop to examples in RPC docs (#2939)
follow-up on https://github.com/tendermint/tendermint/pull/2936
This commit is contained in:
@ -17,6 +17,11 @@ import (
|
||||
//
|
||||
// ```go
|
||||
// client := client.NewHTTP("tcp://0.0.0.0:26657", "/websocket")
|
||||
// err := client.Start()
|
||||
// if err != nil {
|
||||
// // handle error
|
||||
// }
|
||||
// defer client.Stop()
|
||||
// info, err := client.NetInfo()
|
||||
// ```
|
||||
//
|
||||
@ -95,6 +100,11 @@ func UnsafeDialPeers(peers []string, persistent bool) (*ctypes.ResultDialPeers,
|
||||
//
|
||||
// ```go
|
||||
// client := client.NewHTTP("tcp://0.0.0.0:26657", "/websocket")
|
||||
// err := client.Start()
|
||||
// if err != nil {
|
||||
// // handle error
|
||||
// }
|
||||
// defer client.Stop()
|
||||
// genesis, err := client.Genesis()
|
||||
// ```
|
||||
//
|
||||
|
Reference in New Issue
Block a user