IsSystemAccount reports whether the connected client's account is the system account.
()
| 2670 | // IsSystemAccount reports whether the connected client's account |
| 2671 | // is the system account. |
| 2672 | func (nc *Conn) IsSystemAccount() bool { |
| 2673 | if nc == nil { |
| 2674 | return false |
| 2675 | } |
| 2676 | |
| 2677 | nc.mu.RLock() |
| 2678 | defer nc.mu.RUnlock() |
| 2679 | |
| 2680 | if nc.status != CONNECTED { |
| 2681 | return false |
| 2682 | } |
| 2683 | return nc.info.IsSystemAccount |
| 2684 | } |
| 2685 | |
| 2686 | // Low level setup for structs, etc |
| 2687 | func (nc *Conn) setup() { |
no outgoing calls