ConnectedUrl reports the connected server's URL
()
| 2500 | |
| 2501 | // ConnectedUrl reports the connected server's URL |
| 2502 | func (nc *Conn) ConnectedUrl() string { |
| 2503 | if nc == nil { |
| 2504 | return _EMPTY_ |
| 2505 | } |
| 2506 | |
| 2507 | nc.mu.RLock() |
| 2508 | defer nc.mu.RUnlock() |
| 2509 | |
| 2510 | if nc.status != CONNECTED { |
| 2511 | return _EMPTY_ |
| 2512 | } |
| 2513 | return nc.current.URL.String() |
| 2514 | } |
| 2515 | |
| 2516 | // ConnectedUrlRedacted reports the connected server's URL with passwords redacted |
| 2517 | func (nc *Conn) ConnectedUrlRedacted() string { |