(addr string)
| 35 | } |
| 36 | |
| 37 | func ResolveTCPAddr(addr string) *net.TCPAddr { |
| 38 | tcpAddr, _ := net.ResolveTCPAddr("tcp", addr) |
| 39 | return tcpAddr |
| 40 | } |
| 41 | |
| 42 | func ResolveTCPAddrTimeout(addr string, timeout time.Duration) *net.TCPAddr { |
| 43 | cntx, cancel := context.WithTimeout(context.Background(), timeout) |
no outgoing calls