NewTestServerClient return a TestServerClient with unique address
()
| 74 | |
| 75 | // NewTestServerClient return a TestServerClient with unique address |
| 76 | func NewTestServerClient() *TestServerClient { |
| 77 | testenv.SetGOMAXPROCSForTest() |
| 78 | return &TestServerClient{ |
| 79 | Port: 0, |
| 80 | StatusPort: 0, |
| 81 | StatusScheme: "http", |
| 82 | } |
| 83 | } |
| 84 | |
| 85 | // Addr returns the address of the server. |
| 86 | func (cli *TestServerClient) Addr() string { |