dsl/client.go
func (p *PactClient) StartServer(args []string, port int) *types.MockServer {
	log.Println("[DEBUG] client: starting a server with args:", args, "port:", port)
	args = append(args, []string{"--port", strconv.Itoa(port)}...)
	svc := p.pactMockSvcManager.NewService(args)
	cmd := svc.Start()

	waitForPort(port, p.getNetworkInterface(), p.Address, p.TimeoutDuration,
		fmt.Sprintf(`Timed out waiting for Mock Server to start on port %d - are you sure it's running?`, port))

	return &types.MockServer{
		Pid:  cmd.Process.Pid,
		Port: port,
	}
}
func (p *PactClient) StartServer(args []string, port int) *types.MockServer {
	log.Println("[DEBUG] client: starting a server with args:", args, "port:", port)
	args = append(args, []string{"--port", strconv.Itoa(port)}...)
	svc := p.pactMockSvcManager.NewService(args)
	cmd := svc.Start()

	waitForPort(port, p.getNetworkInterface(), p.Address, p.TimeoutDuration,
		fmt.Sprintf(`Timed out waiting for Mock Server to start on port %d - are you sure it's running?`, port))

	return &types.MockServer{
		Pid:  cmd.Process.Pid,
		Port: port,
	}
}
// StartServer starts a remote Pact Mock Server.