()
| 155 | } |
| 156 | |
| 157 | func ExampleConn_name() { |
| 158 | conn := rdb.Conn() |
| 159 | |
| 160 | err := conn.ClientSetName(ctx, "foobar").Err() |
| 161 | if err != nil { |
| 162 | panic(err) |
| 163 | } |
| 164 | |
| 165 | // Open other connections. |
| 166 | for i := 0; i < 10; i++ { |
| 167 | go rdb.Ping(ctx) |
| 168 | } |
| 169 | |
| 170 | s, err := conn.ClientGetName(ctx).Result() |
| 171 | if err != nil { |
| 172 | panic(err) |
| 173 | } |
| 174 | fmt.Println(s) |
| 175 | // Output: foobar |
| 176 | } |
| 177 | |
| 178 | func ExampleConn_client_setInfo_libraryVersion() { |
| 179 | conn := rdb.Conn() |
nothing calls this directly
no test coverage detected