Commit f8723643 authored by Weixin Deng's avatar Weixin Deng
Browse files

Adjust args

parent c498df0c
......@@ -34,7 +34,7 @@ type Args struct {
func parseArgs() Args {
var startServer = flag.Bool("server", false, "Start server")
var startClient = flag.Bool("client", false, "Start client")
var addr = flag.String("addr", "localhost", "Address")
var addr = flag.String("addr", "", "Address")
var numPorts = flag.Int("numPorts", 0, "Number of ports")
var ports = flag.String("ports", "", "Ports")
var numServers = flag.Int("numServers", 0, "Number of servers")
......@@ -81,6 +81,9 @@ func parseArgs() Args {
}
Assert(len(args.servers) == args.numServers,
"numServers is not equal to the number of servers")
Assert(len(args.addr) > 0)
Assert(len(args.ports) > 0)
Assert(len(args.servers) > 0)
return args
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment