Helper function to return scheme
()
| 2039 | |
| 2040 | // Helper function to return scheme |
| 2041 | func (nc *Conn) connScheme() string { |
| 2042 | if nc.ws { |
| 2043 | if nc.Opts.Secure { |
| 2044 | return wsSchemeTLS |
| 2045 | } |
| 2046 | return wsScheme |
| 2047 | } |
| 2048 | if nc.Opts.Secure { |
| 2049 | return tlsScheme |
| 2050 | } |
| 2051 | return "nats" |
| 2052 | } |
| 2053 | |
| 2054 | // Return true iff u.Hostname() is an IP address. |
| 2055 | func hostIsIP(u *url.URL) bool { |
no outgoing calls
no test coverage detected